diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-09-18 17:40:09 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-09-19 10:24:35 +0200 |
| commit | fa12ae40095cd032b05068b34a6ea481bf229bd3 (patch) | |
| tree | 0f0b93fba99f722b13aa6c4c369a034ee06c2650 /addons/website_theme_install | |
| parent | 3ecf2fbc7e8a34437d3abd4ffbf2f680b6f226b1 (diff) | |
[FIX] website_theme_install: fix the enable_view method
The method failed to enable views which were created by copying a
theme.ir.ui.view. This is because standard views were found with the
'ref' method while those particular ones were found thanks to the
copy_ids field... which only found the already active ones by default.
Diffstat (limited to 'addons/website_theme_install')
| -rw-r--r-- | addons/website_theme_install/models/theme_models.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/website_theme_install/models/theme_models.py b/addons/website_theme_install/models/theme_models.py index f073fb5efbe..cb904b48f07 100644 --- a/addons/website_theme_install/models/theme_models.py +++ b/addons/website_theme_install/models/theme_models.py @@ -75,6 +75,7 @@ class Theme(models.AbstractModel): obj = self.env.ref(xml_id) if obj._name == 'theme.ir.ui.view': website = self.env['website'].get_current_website() + obj = obj.with_context(active_test=False) obj = obj.copy_ids.filtered(lambda x: x.website_id == website) obj.write({'active': active}) |
