diff options
| author | Yannick Tivisse <yti@odoo.com> | 2017-08-02 10:19:15 +0200 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-08-02 12:32:24 +0200 |
| commit | ee5ebbadabaedab09e05e3b0a0d03fb46fe5f919 (patch) | |
| tree | 98115306024c0f62da76a572578567f71e7f4c76 /odoo/addons/base/module | |
| parent | a445548f07fbf8d883f4b02e18a35f4b324c6961 (diff) | |
[FIX] base/module: Use a correct env to load next action on install
Bug introduced in https://github.com/odoo/odoo/commit/c8601f4384e0c95abc92d1f0b3092cfe2cb2a79d
Purpose
=======
If a module installation is supposed to load an action (example: a wizard like in l10n_eu_service) and if the related action is defined in this module (example: l10n_eu_service.wizard), currently we're using the environment defined on self, which is not updated after the module install, and the key is not defined in the registry.
Specification
=============
Instead of using the environment on self, let's use the new environment created after the cursor commit.
Diffstat (limited to 'odoo/addons/base/module')
| -rw-r--r-- | odoo/addons/base/module/module.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/addons/base/module/module.py b/odoo/addons/base/module/module.py index b433a1b07f7..32c875c3fd8 100644 --- a/odoo/addons/base/module/module.py +++ b/odoo/addons/base/module/module.py @@ -506,7 +506,7 @@ class Module(models.Model): self._cr.commit() env = api.Environment(self._cr, self._uid, self._context) - config = self.next() or {} + config = env['ir.module.module'].next() or {} if config.get('type') not in ('ir.actions.act_window_close',): return config |
