From c0d05fff10e103034f57bf6cffc6828438d0a558 Mon Sep 17 00:00:00 2001 From: Gorash Date: Thu, 25 Sep 2025 14:11:36 +0200 Subject: [PATCH] [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#1151 Related: odoo/odoo#226627 Related: odoo/enterprise#94487 Signed-off-by: Christophe Matthieu (chm) --- test_themes/tests/test_crawl.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test_themes/tests/test_crawl.py b/test_themes/tests/test_crawl.py index 3b007cf72..1f2365a1e 100644 --- a/test_themes/tests/test_crawl.py +++ b/test_themes/tests/test_crawl.py @@ -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')