From bcc84fb0815fcc35fa4a5cf03ac1f5942e9d8c4b Mon Sep 17 00:00:00 2001 From: Romain Derie Date: Thu, 27 Oct 2022 12:45:38 +0000 Subject: [PATCH] [FIX] test_themes: call post_copy again on test_themes' themes Since [1], the themes installed in the `_post_init` hook of test_themes would not go through the `_post_copy()` anymore. It is not a big deal as this module purpose is to ease our tests and quickly being able to navigate through themes when we need to, but still this is something that need to be fixed as otherwise the themes would not really reflect how they look like. Typically, go to the Odoo Experts theme, which is supposed to have the "Contact" header template, it will not have that header layout. [1]: https://github.com/odoo/odoo/commit/b8a24efa71daea1f96465b780f4f0e384ce74703 closes odoo/design-themes#614 X-original-commit: fea847977d8bd4b0c0ddfc7685e3d3dc0933759c Signed-off-by: Romain Derie (rde) --- test_themes/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_themes/__init__.py b/test_themes/__init__.py index bd9f853b5..30ace50a9 100644 --- a/test_themes/__init__.py +++ b/test_themes/__init__.py @@ -24,5 +24,5 @@ def post_init_hook(cr, registry): 'record': website, 'noupdate': True, # Avoid unlink on -u }) - theme._theme_get_stream_themes()._theme_load(website) + theme.with_context(apply_new_theme=True)._theme_get_stream_themes()._theme_load(website) env['ir.model.data']._update_xmlids(xmlids)