Browse Source

Merge pull request #114 from Tecnativa/9.0-email_template_qweb-coding-fix

[FIX] email_template_qweb: Decode body when encoded
pull/117/head
Rafael Blasco 8 years ago
committed by GitHub
parent
commit
c954baf2ff
  1. 6
      email_template_qweb/models/mail_template.py

6
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']
)

Loading…
Cancel
Save