summaryrefslogtreecommitdiff
path: root/openerp
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2016-08-17 12:05:05 +0200
committerRaphael Collet <rco@openerp.com>2016-08-31 17:21:56 +0200
commitb58beee4687bac1f4e8bc1fa452653c9e8e1e871 (patch)
treee4debffada52393f1b84eb231ecc3bd03ee58bd4 /openerp
parent72afd2823077fffc027ee6da692b8f8a89dfc794 (diff)
[FIX] res_config: reset environment after module installation/deinstallation
Diffstat (limited to 'openerp')
-rw-r--r--openerp/addons/base/res/res_config.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/openerp/addons/base/res/res_config.py b/openerp/addons/base/res/res_config.py
index 4b67290f040..d2dd1676b55 100644
--- a/openerp/addons/base/res/res_config.py
+++ b/openerp/addons/base/res/res_config.py
@@ -554,10 +554,12 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
if action:
return action
- # After the uninstall/install calls, the self.pool is no longer valid.
- # So we reach into the RegistryManager directly.
- ResConfig = registry(self._cr.dbname)['res.config']
- config = ResConfig.browse(self._cr, self._uid, [], self._context).next() or {}
+ if to_install or to_uninstall_modules:
+ # After the uninstall/install calls, the registry and environments
+ # are no longer valid. So we reset the environment.
+ self.env.reset()
+ self = self.env()[self._name]
+ config = self.env['res.config'].next() or {}
if config.get('type') not in ('ir.actions.act_window_close',):
return config