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