Skip to content

Commit

Permalink
Merge pull request #433 from Tecnativa/10.0-website_multi_theme-false…
Browse files Browse the repository at this point in the history
…_positives

[FIX] website_multi_theme: Proper checking of special views inheritance
  • Loading branch information
pedrobaeza committed Mar 9, 2018
2 parents e32d787 + fd1e3e3 commit ad84e38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion website_multi_theme/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"name": "Website Multi Theme",
"summary": "Support different theme per website",
"version": "10.0.1.0.0",
"version": "10.0.1.0.1",
"category": "Website",
"website": "https://www.tecnativa.com",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down
7 changes: 3 additions & 4 deletions website_multi_theme/models/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,12 @@ def _multi_theme_activate(self):
False
)
# Applied views must inherit from custom assets or layout
if (copied_view.inherit_id and
copied_view.inherit_id < main_views):
if copied_view.inherit_id & main_views:
data = etree.fromstring(copied_view.arch)
if copied_view.inherit_id < main_assets_frontend:
if copied_view.inherit_id & main_assets_frontend:
copied_view.inherit_id = custom_assets
data.attrib["inherit_id"] = custom_assets.key
elif copied_view.inherit_id < main_layout:
elif copied_view.inherit_id & main_layout:
copied_view.inherit_id = custom_layout
data.attrib["inherit_id"] = custom_layout.key
copied_view.arch = etree.tostring(data)
Expand Down

0 comments on commit ad84e38

Please sign in to comment.