[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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user