diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 44988520898..bd04a6c2ce0 100755 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -1109,12 +1109,14 @@ crm_email_add_cc_wizard() class crm_calendar_config_wizard(osv.osv_memory): _name = 'crm.calendar.config_wizard' + _inherit = 'res.config' + _columns = { 'name': fields.char('Name', size=64), 'caldav': fields.boolean('Caldav Properties View', help="Manages the fields required for Caldav Properties.") } - - def action_create(self, cr, uid, ids, context=None): + + def execute(self, cr, uid, ids, context=None): res = self.read(cr, uid, ids)[0] idref = {} if res['caldav']: @@ -1126,26 +1128,7 @@ class crm_calendar_config_wizard(osv.osv_memory): if fp: tools.convert_xml_import(cr, 'crm', fp, idref, 'init', noupdate=True) cr.commit() - - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target': 'new', - } - - def action_cancel(self, cr, uid, ids, context=None): - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target': 'new', - } - crm_calendar_config_wizard() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/crm/crm_config.py b/addons/crm/crm_config.py index 04bd451102e..4a687c9ab31 100644 --- a/addons/crm/crm_config.py +++ b/addons/crm/crm_config.py @@ -118,6 +118,8 @@ crm_cases() class crm_menu_config_wizard(osv.osv_memory): _name = 'crm.menu.config_wizard' + _inherit = 'res.config' + _columns = { 'name': fields.char('Name', size=64), 'meeting': fields.boolean('Calendar of Meetings', help="Manages the calendar of meetings of the users."), @@ -137,7 +139,7 @@ class crm_menu_config_wizard(osv.osv_memory): 'phonecall': lambda *args: True, } - def action_create(self, cr, uid, ids, context=None): + def execute(self, cr, uid, ids, context=None): module_proxy = self.pool.get('ir.module.module') modid = module_proxy.search(cr, uid, [('name', '=', 'crm')]) moddemo = module_proxy.browse(cr, uid, modid[0]).demo @@ -167,24 +169,6 @@ class crm_menu_config_wizard(osv.osv_memory): module_proxy.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', - } - - def action_cancel(self, cr, uid, ids, context=None): - return { - 'view_type': 'form', - "view_mode": 'form', - 'res_model': 'ir.actions.configuration.wizard', - 'type': 'ir.actions.act_window', - 'target': 'new', - } - crm_menu_config_wizard() diff --git a/addons/crm/crm_config_view.xml b/addons/crm/crm_config_view.xml index c65344fbcb8..62c01c2037b 100644 --- a/addons/crm/crm_config_view.xml +++ b/addons/crm/crm_config_view.xml @@ -8,28 +8,34 @@ Configure Menu for Sections crm.menu.config_wizard form + -
- -