Commit Graph
3 Commits
Author SHA1 Message Date
Romain Derie 90f411ea03 [FIX] (test_)website: fix standalone tour
Use theme_default instead of theme_common.
Instead, theme_common is not available when only website is installed as it
depends of the design-themes repository.

closes odoo/odoo#82587

X-original-commit: a10522c6509caf7f09f21e6da3224d5865f0ba6a
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-12 11:19:04 +00:00
Romain Derie fa7399c4e6 [FIX] theme_*: enable footer/header template correctly
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

X-original-commit: f18cd32a936829d8a059db0d259189503ee5317f
Part-of: odoo/odoo#81953
2021-12-28 11:47:04 +00:00
qsm-odoo 88e910e187 [REF] website, *: merge website_theme_install into website
* theme_bootswatch, theme_default, website_theme_install
2019-11-12 15:53:13 +00:00