[FIX] res_config: only install selected modules
bzr revid: chs@openerp.com-20120925151944-84a93rm1yvza79js
This commit is contained in:
@@ -530,10 +530,12 @@ class res_config_settings(osv.osv_memory):
|
||||
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)
|
||||
if config[name]:
|
||||
if not module or module.state == 'uninstalled':
|
||||
to_install_names.append(name[lm:])
|
||||
else:
|
||||
to_install_names.append(name[lm:])
|
||||
if module and module.state in ('installed', 'to upgrade'):
|
||||
to_uninstall_ids.append(module.id)
|
||||
|
||||
if to_uninstall_ids:
|
||||
ir_module.button_immediate_uninstall(cr, uid, to_uninstall_ids, context=context)
|
||||
@@ -545,8 +547,6 @@ class res_config_settings(osv.osv_memory):
|
||||
'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 {
|
||||
'type': 'ir.actions.client',
|
||||
|
||||
Reference in New Issue
Block a user