diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-10-09 02:08:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-10-09 02:08:17 +0200 |
| commit | d74b4518052066446e2a1975a91ce53c745ca75a (patch) | |
| tree | c08180f88a512d15e37fbec628931f02b3825f65 /addons/website_theme_install/models/ir_module_module.py | |
| parent | ec162dd0cb5622ab6e56db1a63dab5f531a96f4a (diff) | |
| parent | f4105eb9c7010f8693e5d2fd20c0bd9d9cc2e483 (diff) | |
[MERGE] forward port branch 13.0 up to f4105eb9c70
Diffstat (limited to 'addons/website_theme_install/models/ir_module_module.py')
| -rw-r--r-- | addons/website_theme_install/models/ir_module_module.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/addons/website_theme_install/models/ir_module_module.py b/addons/website_theme_install/models/ir_module_module.py index 532be6e52c6..b9239df97e9 100644 --- a/addons/website_theme_install/models/ir_module_module.py +++ b/addons/website_theme_install/models/ir_module_module.py @@ -189,7 +189,6 @@ class IrModuleModule(models.Model): ON CONFLICT DO NOTHING""", (dst_field, new_rec.id, src_field, old_rec.id)) - def _theme_load(self, website): """ For every type of model in ``self._theme_model_names``, and for every theme in ``self``: @@ -203,9 +202,6 @@ class IrModuleModule(models.Model): for model_name in self._theme_model_names: module._update_records(model_name, website) - # reload registry to check if 'theme.utils'._<theme_name>_post_copy exists - self.env.reset() - self = self.env()[self._name].browse(self.id) self.env['theme.utils']._post_copy(module, website) def _theme_unload(self, website): @@ -361,17 +357,10 @@ class IrModuleModule(models.Model): self._theme_upgrade_upstream() - next_action = False if self.state != 'installed': - next_action = self.button_immediate_install() - - # Alter next action for redirect - if not next_action: - next_action = website.button_go_website() - if next_action.get('tag') == 'reload' and not next_action.get('params', {}).get('menu_id'): - next_action = self.env.ref('website.action_website').read()[0] + self.button_immediate_install() - return next_action + return website.button_go_website() def button_remove_theme(self): """Remove the current theme of the current website.""" |
