From 8776619cf177fe120819b56a28c8e83f38eead0b Mon Sep 17 00:00:00 2001 From: eLBati Date: Thu, 22 Mar 2018 11:34:57 +0100 Subject: [PATCH] FIX mail_notify_bounce: TypeError: decoding Unicode is not supported as message_dict['body'] is unicode yet --- mail_notify_bounce/__manifest__.py | 2 +- mail_notify_bounce/models/mail_thread.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mail_notify_bounce/__manifest__.py b/mail_notify_bounce/__manifest__.py index 93644afe..96e03cb4 100644 --- a/mail_notify_bounce/__manifest__.py +++ b/mail_notify_bounce/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Notify bounce emails", "summary": "Notify bounce emails to preconfigured addresses", - "version": "10.0.1.0.0", + "version": "10.0.1.0.1", "category": "Mail", "website": "https://github.com/OCA/social", "author": "Agile Business Group, Odoo Community Association (OCA)", diff --git a/mail_notify_bounce/models/mail_thread.py b/mail_notify_bounce/models/mail_thread.py index 8700c079..667bfaf1 100644 --- a/mail_notify_bounce/models/mail_thread.py +++ b/mail_notify_bounce/models/mail_thread.py @@ -59,7 +59,7 @@ class MailThread(models.AbstractModel): 'body_html': ( u"%s


%s

%s" % ( - unicode(message_dict['body'], errors='replace'), + message_dict['body'], _("Raw message:"), unicode(message.__str__(), errors='replace').replace( "\n", "
")