diff --git a/openerp/addons/base/res/res_config.py b/openerp/addons/base/res/res_config.py index be2f37ad25e..caa4d18e44a 100644 --- a/openerp/addons/base/res/res_config.py +++ b/openerp/addons/base/res/res_config.py @@ -540,14 +540,19 @@ class res_config_settings(osv.osv_memory): if to_install_ids: ir_module.button_immediate_install(cr, uid, to_install_ids, context) - # open the root menu Settings, and force client-side refresh - menu = ir_model_data.get_object(cr, uid, 'base', 'menu_administration', context) + # open the menu for this wizard (or Settings), and force client-side refresh + act_ids = self.pool.get('ir.actions.act_window').search(cr, uid, [('res_model', '=', self._name)]) + act_refs = ['ir.actions.act_window,%s' % id for id in act_ids] + val_ids = ir_values.search(cr, uid, [('model', '=', 'ir.ui.menu'), ('key', '=', 'action'), + ('key2', '=', 'tree_but_open'), ('value', 'in', act_refs)]) + if val_ids: + menu_id = ir_values.browse(cr, uid, val_ids[0]).res_id + else: + menu_id = ir_model_data.get_object(cr, uid, 'base', 'menu_administration', context).id return { 'type': 'ir.ui.menu', - 'menu_id': menu.id, - 'reload' : True, + 'menu_id': menu_id, + 'reload': True, } -res_config_settings() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: