From fa12ae40095cd032b05068b34a6ea481bf229bd3 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Tue, 18 Sep 2018 17:40:09 +0200 Subject: [PATCH] [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. --- addons/website_theme_install/models/theme_models.py | 1 + 1 file changed, 1 insertion(+) 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})