diff --git a/addons/profile_manufacturing/profile_manufacturing.py b/addons/profile_manufacturing/profile_manufacturing.py index 991e405bafb..a58878fe88f 100644 --- a/addons/profile_manufacturing/profile_manufacturing.py +++ b/addons/profile_manufacturing/profile_manufacturing.py @@ -25,6 +25,8 @@ import pooler class profile_manufacturing_config_install_modules_wizard(osv.osv_memory): _name='profile.manufacturing.config.install_modules_wizard' + _inherit = 'res.config' + _columns = { 'mrp_jit':fields.boolean('Just in Time Scheduling', help="The JIT module allows you to not run the scheduler "\ @@ -76,31 +78,16 @@ class profile_manufacturing_config_install_modules_wizard(osv.osv_memory): help="Allow to manage product repairs. Handle the guarantee limit date and the invoicing of products and services."), } - def action_cancel(self,cr,uid,ids,conect=None): - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target':'new', - } - def action_install(self, cr, uid, ids, context=None): - result=self.read(cr,uid,ids) + 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]: + 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) - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target':'new', - } + 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: diff --git a/addons/profile_manufacturing/profile_manufacturing.xml b/addons/profile_manufacturing/profile_manufacturing.xml index b20d9fdfe96..13f4aa9ddbe 100644 --- a/addons/profile_manufacturing/profile_manufacturing.xml +++ b/addons/profile_manufacturing/profile_manufacturing.xml @@ -5,46 +5,47 @@ Manufacturing Profile: Install Extra Modules profile.manufacturing.config.install_modules_wizard form + -
- - - - - - - - - - - - - - - - -