-
- Downloads
[FIX] theme_*: enable footer/header template correctly
Backport of https://github.com/odoo/odoo/commit/f18cd32a936829d8a059db0d259189503ee5317f Some theme are enabling an header template. When doing so, they also disable the default header template. But this is not enough, as the user could have changed that template and it is not the default one anymore. Then, updating that theme (UX, CLI, Migration) will raise a traceback. Step to reproduce: - Create a website and install theme avantgarde - Enter edit mode and select Magazine header template At that point, update the theme, either: - Through the UI, on theme switch screen, click on Update - Through CLI, just run a `-u theme_avantgarde` -> A traceback will be raised about an xpath error, as both the magazine header template and the hamburger header template are active at the same time. Only one template is supposed to be activated. The issue also impact migration, as migrated website can't be accessed due to the xpath error on rendering. Theme being impacted (at least): Avantgarde, Graphene & Nano Note that when installing one of those themes for the first time on a website, the error won't occur as `_reset_default_config()` will be called through `_theme_remove()`. Note that this fix will ensure the correct template is set (and all others are disabled), but the scss variable won't be correctly set (as it would be if that template change was done through the right panel). This is not that much of a problem (considering what it solves), any later change from the user through the right panel will solve that mismatch. Fixes https://github.com/odoo/upgrade/pull/3048 task-2593407 opw-2680866 opw-2685951 opw-2685124 opw-2679040 Part-of: odoo/odoo#82470
Please register or sign in to comment