From 5d2a3bd93b71a162d0c65268eb68d04451d318d7 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 22 Oct 2016 00:21:09 +0200 Subject: [PATCH] [FIX] email_template_qweb: Decoding is needed if not unicode --- email_template_qweb/models/mail_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/email_template_qweb/models/mail_template.py b/email_template_qweb/models/mail_template.py index c38f7fe3..b1c4564e 100644 --- a/email_template_qweb/models/mail_template.py +++ b/email_template_qweb/models/mail_template.py @@ -33,7 +33,7 @@ class MailTemplate(models.Model): }) # Some wizards, like when sending a sales order, need this # fix to display accents correctly - if isinstance(result[record_id]['body_html'], unicode): + if not isinstance(body_html, unicode): body_html = body_html.decode('utf-8') result[record_id]['body_html'] = self.render_post_process( body_html