1 # -*- coding: utf-8 -*-
2 ##############################################################################
4 # OpenERP, Open Source Management Solution
5 # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as
9 # published by the Free Software Foundation, either version 3 of the
10 # License, or (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Affero General Public License for more details.
17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ##############################################################################
21 from osv import fields, osv
24 class base_setup_installer(osv.osv_memory):
25 _name = 'base.setup.installer'
26 _inherit = 'res.config.installer'
29 ('sale','crm'): ['sale_crm'],
30 ('sale','project'): ['project_mrp'],
34 'crm':fields.boolean('Customer Relationship Management',
35 help="Helps you track and manage relations with customers such as"
36 " leads, requests or issues. Can automatically send "
37 "reminders, escalate requests or trigger business-specific "
38 "actions based on standard events."),
39 'sale':fields.boolean('Sales Management',
40 help="Helps you handle your quotations, sale orders and invoicing"
42 'project':fields.boolean('Project Management',
43 help="Helps you manage your projects and tasks by tracking them, "
44 "generating plannings, etc..."),
45 'knowledge':fields.boolean('Knowledge Management',
46 help="Lets you install addons geared towards sharing knowledge "
47 "with and between your employees."),
48 'stock':fields.boolean('Warehouse Management',
49 help="Helps you manage your stocks and stocks locations, as well "
50 "as the flow of stock between warehouses."),
51 'mrp':fields.boolean('Manufacturing',
52 help="Helps you manage your manufacturing processes and generate "
53 "reports on those processes."),
54 'account':fields.boolean('Financial & Accounting',
55 help="Helps you handle your accounting needs, as well as create "
56 "and track your budgets."),
57 'purchase':fields.boolean('Purchase Management',
58 help="Helps you manage your purchase-related processes such as "
59 "requests for quotations, supplier invoices, etc..."),
60 'hr':fields.boolean('Human Resources',
61 help="Helps you manage your human resources by encoding your "
62 "employee structure, generating work sheets, tracking "
63 "attendance and more."),
64 'point_of_sale':fields.boolean('Point of Sales',
65 help="Helps you get the most out of your points of sales with "
66 "fast sale encoding, simplified payment mode encoding, "
67 "automatic picking lists generation and more."),
68 'marketing':fields.boolean('Marketing',
69 help="Helps you manage your marketing campaigns step by step."),
70 'misc_tools':fields.boolean('Miscellaneous Tools',
71 help="Lets you install various interesting but non-essential "
72 "tools like Survey, Lunch,..."),
73 'report_designer':fields.boolean('Advanced Reporting',
74 help="Lets you install various tools to simplify and enhance "
75 "OpenERP's report creation."),
76 'thunderbird' :fields.boolean('Thunderbird'),
78 'product_expiry':fields.boolean('Food Industry',
79 help="Installs a preselected set of OpenERP "
80 "applications which will help you manage foods."),
81 'profile_association':fields.boolean('Associations',
82 help="Installs a preselected set of OpenERP "
83 "applications which will help you manage your association "
85 'profile_auction':fields.boolean('Auction Houses',
86 help="Installs a preselected set of OpenERP "
87 "applications selected to help you manage your auctions "
88 "as well as the business processes around them."),
89 'profile_bookstore':fields.boolean('Book Stores',
90 help="Installs a preselected set of OpenERP "
91 "applications which will help you manage your book store "
99 def onchange_moduleselection(self, cr, uid, ids, *args):
100 progress = self._progress(cr, uid) - round((len(filter(lambda x: x==1, args)))*80/len(args))
103 return {'value':{'progress':progress}}
105 def modules_to_install(self, cr, uid, ids, context=None):
106 modules = super(base_setup_installer, self).modules_to_install(cr, uid, ids, context=context)
107 interface_id = self.pool.get('res.config.view').search(cr, uid, [])
108 interface = self.pool.get('res.config.view').read(cr, uid, interface_id)[0]
109 modules_selected = self.read(cr, uid, ids)[0]
111 if interface.get('view', '') == 'simple' :
112 if modules_selected.get('mrp', False):
113 added_modules.append('mrp_jit')
114 if modules_selected.get('knowledge', False):
115 added_modules.append('document_ftp')
116 return modules | set(added_modules)
117 base_setup_installer()