diff --git a/email_template_qweb/models/mail_template.py b/email_template_qweb/models/mail_template.py index a8865a70..95aaaf58 100644 --- a/email_template_qweb/models/mail_template.py +++ b/email_template_qweb/models/mail_template.py @@ -33,6 +33,12 @@ class MailTemplate(models.Model): 'email_template': this, }) ) + # Some wizards, like when sending a sales order, need this + # fix to display accents correctly + if isinstance(result[record_id]['body_html'], unicode): + result[record_id]['body_html'] = ( + result[record_id]['body_html'].decode('utf-8') + ) result[record_id]['body'] = tools.html_sanitize( result[record_id]['body_html'] )