diff --git a/addons/profile_service/profile_service.py b/addons/profile_service/profile_service.py index 48236901d90..1b5195b9099 100644 --- a/addons/profile_service/profile_service.py +++ b/addons/profile_service/profile_service.py @@ -24,6 +24,7 @@ import pooler class profile_service_config_install_modules_wizard(osv.osv_memory): _name='profile.service.config.install_modules_wizard' + _inherit = 'res.config' _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."), @@ -46,31 +47,16 @@ class profile_service_config_install_modules_wizard(osv.osv_memory): help="An integrated wiki content management system. This is really "\ "usefull to manage FAQ, quality manuals, etc.") } - 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) + 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', - } profile_service_config_install_modules_wizard() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/profile_service/profile_service.xml b/addons/profile_service/profile_service.xml index e1533ead011..94a967d1840 100644 --- a/addons/profile_service/profile_service.xml +++ b/addons/profile_service/profile_service.xml @@ -5,32 +5,37 @@ Service Profile : Install extra modules profile.service.config.install_modules_wizard form + -
- - - - - - - - - - - - - - - - - - -