[IMP] website: Introduce high-level cache for website pages

ormcache invalidation in test_02_homepage_tour_every_theme test.

The configurator_apply method and various methods used for theme added
on `ir.module.module` from website write directely on `ir.model.data`
and update attachments, views, xmlids. They are missing invalidations
of template ormcache and others.

Adding a high-level cache revealed the problem, but this issue
already exists, it impacts all template caches such as `website.page`
and `ir.qweb`.

see odoo/odoo#224487
see odoo/odoo#88276

closes odoo/design-themes#1164

X-original-commit: c0d05fff10
Related: odoo/odoo#229552
Related: odoo/enterprise#96044
Signed-off-by: Christophe Matthieu (chm) <chm@odoo.com>
This commit is contained in:
Gorash
2025-09-25 12:11:36 +00:00
committed by Raphael Collet
parent 8b04b6dcf9
commit 87a2757729
+7
View File
@@ -49,4 +49,11 @@ class Crawler(HttpCase):
Website = self.env['website']
websites_themes = Website.get_test_themes_websites()
for website in websites_themes:
# TODO: remove this invalidation and invalidation in theme feature.
# They are missing invalidations of template ormcache and others.
# The configurator_apply method and various methods used for theme
# added on `ir.module.module` from website write directly on
# `ir.model.data` and update attachments, views, xmlids.
self.env.registry.clear_cache('templates')
self.start_tour(f"/web?fw={website.id}", 'homepage', login='admin')