From cf61c63ddf0421e0fd0551e2755aeddb42dce049 Mon Sep 17 00:00:00 2001 From: Antoine Guenet Date: Thu, 31 Aug 2023 11:27:22 +0000 Subject: [PATCH] [FIX] mass_mailing: preserve comments when testing a mailing When sending a mailing we make sure to preserve comments (in particular so that MSO comments can be read by Outlook). However this was not the case when testing a mailing using the Test button in the form view. task-3488162 opw-3290548 opw-3479234 closes odoo/odoo#133998 X-original-commit: 66b1dc38ced221d63f11827a217f9805827d5e65 Signed-off-by: Antoine Guenet (age) Signed-off-by: David Monjoie (dmo) --- addons/mass_mailing/wizard/mailing_mailing_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mass_mailing/wizard/mailing_mailing_test.py b/addons/mass_mailing/wizard/mailing_mailing_test.py index d450f27442c..c2e21b799ef 100644 --- a/addons/mass_mailing/wizard/mailing_mailing_test.py +++ b/addons/mass_mailing/wizard/mailing_mailing_test.py @@ -39,7 +39,7 @@ class TestMassMailing(models.TransientModel): if record: # Returns a proper error if there is a syntax error with Qweb # do not force lang, will simply use user context - body = mailing._render_field('body_html', record.ids, compute_lang=False)[record.id] + body = mailing._render_field('body_html', record.ids, compute_lang=False, options={'preserve_comments': True})[record.id] preview = mailing._render_field('preview', record.ids, compute_lang=False)[record.id] full_body = mailing._prepend_preview(Markup(body), preview) subject = mailing._render_field('subject', record.ids, compute_lang=False)[record.id]