From 7260de28d0dd640069fc52ee1b501bd467903a28 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 21 Sep 2012 15:29:11 +0200 Subject: [PATCH] [IMP] res_config: return correct action for installing modules from apps bzr revid: chs@openerp.com-20120921132911-n6mb58gxlo9aqflm --- openerp/addons/base/res/res_config.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/res/res_config.py b/openerp/addons/base/res/res_config.py index bd75d280e7c..0ff4b5104d8 100644 --- a/openerp/addons/base/res/res_config.py +++ b/openerp/addons/base/res/res_config.py @@ -528,17 +528,24 @@ class res_config_settings(osv.osv_memory): # module fields: install/uninstall the selected modules to_install_names = [] to_uninstall_ids = [] + lm = len('module_') for name, module in classified['module']: if module and module.state in ('installed', 'to upgrade'): to_uninstall_ids.append(module.id) else: - to_install_names.append(name) + to_install_names.append(name[lm:]) if to_uninstall_ids: ir_module.button_immediate_uninstall(cr, uid, to_uninstall_ids, context=context) if to_install_names: - return ir_module.install_by_names(cr, uid, to_install_names, context=context) + return { + 'type': 'ir.actions.client', + 'tag': 'apps', + 'params': {'modules': to_install_names}, + } + + #return ir_module.install_by_names(cr, uid, to_install_names, context=context) # force client-side reload (update user menu and current view) return {