From b708c94a79cee2440111ed3c5eda7276ffc92c00 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 15 Jul 2010 18:16:23 +0530 Subject: [PATCH] [FIX]: crm: Fixed problem of sending mail to CC separated by semicolon bzr revid: rpa@tinyerp.com-20100715124623-rpb7ut4tv9n7ql5p --- addons/crm/crm_lead.py | 2 +- addons/crm/wizard/crm_send_email.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 5c7fdb08522..f7d551e1313 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -117,7 +117,7 @@ class crm_lead(osv.osv, crm_case): Defines responsible user and e-mail address for the mail gateway.'), 'create_date': fields.datetime('Creation Date' , readonly=True), 'email_cc': fields.text('Watchers Emails', size=252 , help="These \ -addresses will receive a copy of the future e-mail communication between partner \ +addresses(Comma-separated) will receive a copy of the future e-mail communication between partner \ and users"), 'description': fields.text('Notes'), 'write_date': fields.datetime('Update Date' , readonly=True), diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py index 58aa729e454..022f987e295 100644 --- a/addons/crm/wizard/crm_send_email.py +++ b/addons/crm/wizard/crm_send_email.py @@ -26,6 +26,7 @@ from tools.translate import _ import base64 import itertools import tools +import re class crm_send_new_email_attachment(osv.osv_memory): _name = 'crm.send.mail.attachment' @@ -105,7 +106,7 @@ class crm_send_new_email(osv.osv_memory): ref_id = hist.ref_id case = case_pool.browse(cr, uid, res_id, context=context) emails = [obj.email_to] - email_cc = obj.email_cc and obj.email_cc.split(',') or '' + email_cc = re.findall(r'([^ ,<@]+@[^> ,]+)', obj.email_cc) emails = filter(None, emails) body = obj.body