From 40494b807df6ced71279875bc806d0dc5dc616a7 Mon Sep 17 00:00:00 2001 From: Antoine Guenet Date: Tue, 31 Jan 2023 14:12:09 +0000 Subject: [PATCH] [FIX] mass_mailing: ensure design element changes are applied When we change something in the DESIGN tab of mass_mailing, we edit a stylesheet. This means we need to flush the rules cache so convert_inline applies the new rules in its conversion. opw-3114599 closes odoo/odoo#111778 X-original-commit: 4ebf106e65ae4901c03c76606a05d8cd2e0790d7 Signed-off-by: David Monjoie (dmo) --- addons/mass_mailing/static/src/js/mass_mailing_snippets.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/mass_mailing/static/src/js/mass_mailing_snippets.js b/addons/mass_mailing/static/src/js/mass_mailing_snippets.js index 1ce86fda384..22a216a1830 100644 --- a/addons/mass_mailing/static/src/js/mass_mailing_snippets.js +++ b/addons/mass_mailing/static/src/js/mass_mailing_snippets.js @@ -220,6 +220,9 @@ options.registry.DesignTab = options.Class.extend({ cssTexts.push(rule.cssText); } this.styleElement.textContent = cssTexts.join('\n'); + // Flush the rules cache for convert_inline, to make sure they are + // recomputed to account for the change. + this.options.wysiwyg._rulesCache = undefined; }, /** * @override