From 37cea376cc2069388b07b91f50caa6044fa6c932 Mon Sep 17 00:00:00 2001 From: Adrien Widart Date: Tue, 25 May 2021 14:35:33 +0000 Subject: [FIX] survey: Unescape characters in mail subject To reproduce the error: Create a survey (title must contain ") and send it Error: The mail subject is incorrect: the character " is replaced with " OPW-2536206 closes odoo/odoo#71363 X-original-commit: a2d46c2d1a64c5006d6a7d9ddf5a08a48e5452b9 Signed-off-by: Nicolas Lempereur (nle) Signed-off-by: Adrien Widart --- addons/survey/wizard/survey_invite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/survey/wizard/survey_invite.py b/addons/survey/wizard/survey_invite.py index 8543587e519..4ad35dbe4cd 100644 --- a/addons/survey/wizard/survey_invite.py +++ b/addons/survey/wizard/survey_invite.py @@ -209,7 +209,7 @@ class SurveyInvite(models.TransientModel): def _send_mail(self, answer): """ Create mail specific for recipient containing notably its access token """ - subject = self.env['mail.render.mixin']._render_template(self.subject, 'survey.user_input', answer.ids, post_process=True)[answer.id] + subject = self.env['mail.render.mixin'].with_context(safe=True)._render_template(self.subject, 'survey.user_input', answer.ids, post_process=True)[answer.id] body = self.env['mail.render.mixin']._render_template(self.body, 'survey.user_input', answer.ids, post_process=True)[answer.id] # post the message mail_values = { -- cgit v1.2.3