[imp] migrate installers in profiles to res.config.installer
bzr revid: xmo@tinyerp.com-20100124130259-0i6230y4ll78bic5
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,7 +15,7 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -24,10 +24,9 @@ import pooler
|
||||
|
||||
class profile_accounting_config_install_modules_wizard(osv.osv_memory):
|
||||
_name='profile.accounting.config.install_modules_wizard'
|
||||
_inherit = 'res.config'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
_columns = {
|
||||
'name':fields.char('Name', size=64),
|
||||
'account_analytic_analysis':fields.boolean('Analytic Accounting'),
|
||||
'account_analytic_plans':fields.boolean('Multiple Analytic Plans'),
|
||||
'account_payment':fields.boolean('Suppliers Payment Management'),
|
||||
@@ -36,18 +35,6 @@ class profile_accounting_config_install_modules_wizard(osv.osv_memory):
|
||||
'account_budget':fields.boolean('Budgets', help="Helps you to manage financial and analytic budgets."),
|
||||
'board_document':fields.boolean('Document Management',help= "The Document Management System of Open ERP allows you to store, browse, automatically index, search and preview all kind of documents (internal documents, printed reports, calendar system). It opens an FTP access for the users to easily browse association's document."),
|
||||
}
|
||||
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
result = self.read(cr, uid, ids)
|
||||
mod_obj = self.pool.get('ir.module.module')
|
||||
for res in result:
|
||||
for r in res:
|
||||
if r != 'id' and res[r]:
|
||||
ids += mod_obj.search(cr, uid, [('name', '=', r)])
|
||||
mod_obj.button_install(cr, uid, ids, context=context)
|
||||
cr.commit()
|
||||
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
profile_accounting_config_install_modules_wizard()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -5,15 +5,19 @@
|
||||
<field name="name">Accounting Profile : Install extra modules</field>
|
||||
<field name="model">profile.accounting.config.install_modules_wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.res_config_view_base"/>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Install Extra Modules</attribute>
|
||||
</form>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<label colspan="4" align="0.0"
|
||||
string="Install more modules. A few modules are proposed according to the Account Profile you selected. You will be able to install them based on our requirements."/>
|
||||
<xpath expr="//label[@string='descrition']"
|
||||
position="attrobites">
|
||||
<attribute name="string"
|
||||
>Install more modules. A few modules are proposed according to the Account Profile you selected. You will be able to install them based on our requirements.</attribute>
|
||||
</xpath>
|
||||
<separator string="title" position="replace"/>
|
||||
<group colspan="8">
|
||||
<separator string="Accounting Management" colspan="4"/>
|
||||
<field name="account_analytic_analysis"/>
|
||||
<field name="account_analytic_plans"/>
|
||||
@@ -42,6 +46,7 @@
|
||||
<record model="ir.actions.todo"
|
||||
id="profile_accounting.config_install_wizard">
|
||||
<field name="action_id" ref="action_config_install_module"/>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -25,7 +25,7 @@ import pooler
|
||||
|
||||
class profile_association_config_install_modules_wizard(osv.osv_memory):
|
||||
_name='profile.association.config.install_modules_wizard'
|
||||
_inherit = 'res.config'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
_columns = {
|
||||
'hr_expense':fields.boolean('Expenses Tracking', help="Tracks the personal expenses process, from the employee expense encoding, to the reimbursement of the employee up to the reinvoicing to the final customer."),
|
||||
@@ -38,15 +38,5 @@ class profile_association_config_install_modules_wizard(osv.osv_memory):
|
||||
'wiki': fields.boolean('Wiki',
|
||||
help="An integrated wiki content management system. This is really usefull to manage FAQ, quality manuals, etc.")
|
||||
}
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
result = self.read(cr,uid,ids)
|
||||
mod_obj = self.pool.get('ir.module.module')
|
||||
for res in result:
|
||||
for r in res:
|
||||
if r != 'id' and res[r]:
|
||||
ids = mod_obj.search(cr, uid, [('name', '=', r)])
|
||||
mod_obj.button_install(cr, uid, ids, context=context)
|
||||
cr.commit()
|
||||
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
profile_association_config_install_modules_wizard()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -5,14 +5,18 @@
|
||||
<field name="name">Association Profile : Install extra modules</field>
|
||||
<field name="model">profile.association.config.install_modules_wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.res_config_view_base"/>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Install Extra Modules</attribute>
|
||||
</form>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<label colspan="4" align="0.0" string="Install more modules. A few modules are proposed according to the Account Profile you selected. You will be able to install them based on our requirements."/>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">Install more modules. A few modules are proposed according to the Association Profile you selected. You will be able to install them based on our requirements.</attribute>
|
||||
</xpath>
|
||||
<separator string="title" position="replace"/>
|
||||
<group colspan="8">
|
||||
<separator string="Project Management" colspan="4"/>
|
||||
<field name="project"/>
|
||||
<field name="project_gtd"/>
|
||||
@@ -38,7 +42,8 @@
|
||||
|
||||
<record model="ir.actions.todo"
|
||||
id="config_install_module">
|
||||
<field name="action_id" ref="action_config_install_module"/>
|
||||
</record>
|
||||
<field name="action_id" ref="action_config_install_module"/>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -25,7 +25,7 @@ import pooler
|
||||
|
||||
class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
|
||||
_name='profile.manufacturing.config.install_modules_wizard'
|
||||
_inherit = 'res.config'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
_columns = {
|
||||
'mrp_jit':fields.boolean('Just in Time Scheduling',
|
||||
@@ -78,16 +78,6 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory):
|
||||
help="Allows to manage product repairs. Handle the guarantee limit date and the invoicing of products and services."),
|
||||
|
||||
}
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
result = self.read(cr,uid,ids)
|
||||
mod_obj = self.pool.get('ir.module.module')
|
||||
for res in result:
|
||||
for r in res:
|
||||
if r != 'id' and res[r]:
|
||||
ids = mod_obj.search(cr, uid, [('name', '=', r)])
|
||||
mod_obj.button_install(cr, uid, ids, context=context)
|
||||
cr.commit()
|
||||
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
profile_manufacturing_config_install_modules_wizard()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -5,14 +5,20 @@
|
||||
<field name="name">Manufacturing Profile: Install Extra Modules</field>
|
||||
<field name="model">profile.manufacturing.config.install_modules_wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.res_config_view_base"/>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Manufacturing Profile: Install Extra Modules</attribute>
|
||||
</form>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<label colspan="4" align="0.0" string="Here are a few modules which might be useful along with the rest of the Manufacturing profile. You can also install them the normal way later on, but if you think you'll need them to fit your requirements, you can select them now and they'll be installed immediately."/>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">Here are a few modules which might be useful along with the rest of the Manufacturing profile. You can also install them the normal way later on, but if you think you'll need them to fit your requirements, you can select them now and they'll be installed immediately.</attribute>
|
||||
</xpath>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Manufacturing Modules</attribute>
|
||||
</separator>
|
||||
<group colspan="8">
|
||||
<separator string="Stock & Manufacturing" colspan="4"/>
|
||||
<field name="stock_location"/>
|
||||
<field name="mrp_jit"/>
|
||||
@@ -29,7 +35,6 @@
|
||||
<field name="warning"/>
|
||||
<field name="portal"/>
|
||||
</group>
|
||||
<xpath expr='//button[@name="action_skip"]' position='replace'/>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
@@ -44,7 +49,8 @@
|
||||
</record>
|
||||
<record model="ir.actions.todo"
|
||||
id="config_install_module">
|
||||
<field name="action_id" ref="action_config_install_module"/>
|
||||
</record>
|
||||
<field name="action_id" ref="action_config_install_module"/>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -24,7 +24,7 @@ import pooler
|
||||
|
||||
class profile_service_config_install_modules_wizard(osv.osv_memory):
|
||||
_name='profile.service.config.install_modules_wizard'
|
||||
_inherit = 'res.config'
|
||||
_inherit = 'res.config.installer'
|
||||
_rec_name = 'crm_configuration'
|
||||
_columns = {
|
||||
'crm_configuration':fields.boolean('CRM & Calendars', help="This installs the customer relationship features like: leads and opportunities tracking, shared calendar, jobs tracking, bug tracker, and so on."),
|
||||
@@ -47,16 +47,6 @@ class profile_service_config_install_modules_wizard(osv.osv_memory):
|
||||
help="An integrated wiki content management system. This is really "\
|
||||
"useful to manage FAQ, quality manuals, etc.")
|
||||
}
|
||||
def execute(self, cr, uid, ids, context=None):
|
||||
result = self.read(cr, uid, ids)
|
||||
mod_obj = self.pool.get('ir.module.module')
|
||||
for res in result:
|
||||
for r in res:
|
||||
if r != 'id' and res[r]:
|
||||
ids = mod_obj.search(cr, uid, [('name', '=', r)])
|
||||
mod_obj.button_install(cr, uid, ids, context=context)
|
||||
cr.commit()
|
||||
db, pool = pooler.restart_pool(cr.dbname, update_module=True)
|
||||
profile_service_config_install_modules_wizard()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -5,16 +5,21 @@
|
||||
<field name="name">Service Profile : Install extra modules</field>
|
||||
<field name="model">profile.service.config.install_modules_wizard</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.res_config_view_base"/>
|
||||
<field name="inherit_id" ref="base.res_config_installer"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<form position="attributes">
|
||||
<attribute name="string">Install Extra Modules</attribute>
|
||||
<attribute name="string">Install Extra Service Profile Modules</attribute>
|
||||
</form>
|
||||
<group string="res_config_contents" position="replace">
|
||||
<label colspan="4" align="0.0"
|
||||
string="A few modules are proposed according to the 'service profile' you selected. You will be able to install them or more modules later through the Administration menu."/>
|
||||
<separator string="Services Management" colspan="4"/>
|
||||
<xpath expr="//label[@string='description']"
|
||||
posititon="attributes">
|
||||
<attribute name="string"
|
||||
>A few modules are proposed according to the 'service profile' you selected. You will be able to install them or more modules later through the Administration menu.</attribute>
|
||||
</xpath>
|
||||
<separator string="title" position="attributes">
|
||||
<attribute name="string">Services Management</attribute>
|
||||
</separator>
|
||||
<group colspan="8">
|
||||
<field name="project_timesheet"/>
|
||||
<field name="hr_timesheet_invoice"/>
|
||||
<field name="project_gtd"/>
|
||||
@@ -48,9 +53,8 @@
|
||||
|
||||
<record model="ir.actions.todo"
|
||||
id="config_install_module">
|
||||
<field name="action_id" ref="action_config_install_module"/>
|
||||
</record>
|
||||
|
||||
|
||||
<field name="action_id" ref="action_config_install_module"/>
|
||||
<field name="sequence">3</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user