From ec3827535f13db6ccdf85157eadfc56ce6d180e2 Mon Sep 17 00:00:00 2001 From: "JMA(OpenERP)" <> Date: Wed, 28 Jul 2010 15:38:30 +0530 Subject: [PATCH] [FIX] crm, mail_gateway: fixes send reminder. bzr revid: vra@tinyerp.com-20100728100830-9d3kpm45e7ghn3n6 --- addons/crm/crm.py | 5 ++++- addons/mail_gateway/mail_gateway.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 2db380f1c93..2cabefd7f13 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -376,7 +376,10 @@ class crm_case(object): if not destination: src, dest = dest, src if body and case.user_id.signature: - body += '\n\n%s' % (case.user_id.signature) + if body: + body += '\n\n%s' % (case.user_id.signature) + else: + body = '\n\n%s' % (case.user_id.signature) body = self.format_body(body) diff --git a/addons/mail_gateway/mail_gateway.py b/addons/mail_gateway/mail_gateway.py index a595b4bf600..ef36be3a3ef 100644 --- a/addons/mail_gateway/mail_gateway.py +++ b/addons/mail_gateway/mail_gateway.py @@ -159,7 +159,8 @@ class mailgate_message(osv.osv): msg_txt = '' if message.history: msg_txt += (message.email_from or '/') + ' wrote on ' + format_date_tz(message.date, tz) + ':\n\t' - msg_txt += '\n\t'.join(message.description.split('\n')[:3]) + '...' + if message.description: + msg_txt += '\n\t'.join(message.description.split('\n')[:3]) + '...' else: msg_txt = (message.user_id.name or '/') + ' on ' + format_date_tz(message.date, tz) + ':\n\t' if message.name == 'Opportunity':