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