From 109fac27dfdcb64d3794374b494ec52745aed213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Fri, 9 Mar 2012 11:56:11 +0100 Subject: [PATCH] [FIX] mail.thread: fixed bug when creating a message without a body_text; void string was converted to False, leading to a problem in string parsing bzr revid: tde@openerp.com-20120309105611-skh1nawgzzq24g4f --- addons/mail/mail_thread.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index fa3a36707f1..336505c4b18 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -129,7 +129,6 @@ class mail_thread(osv.osv): # parse message to get requested users user_ids = self.message_parse_users(cr, uid, [msg_id], vals['body_text'], context=context) for user_id in user_ids: - print 'pushed to %d' % (user_id) notification_obj.create(cr, uid, {'user_id': user_id, 'message_id': msg_id}, context=context) return msg_id @@ -233,7 +232,7 @@ class mail_thread(osv.osv): 'res_id': thread.id, 'date': time.strftime('%Y-%m-%d %H:%M:%S'), 'message_id': message_id, - 'body_text': body_text or (hasattr(thread, 'description') and thread.description or False), + 'body_text': body_text or (hasattr(thread, 'description') and thread.description or ''), 'attachment_ids': [(6, 0, to_attach)], 'state': 'received', 'type': type,