[FIX]: crm: Add Email address to list of global CC when we forward lead to partner

bzr revid: rpa@tinyerp.com-20100720061147-7wqlfkrdxsyed14z
This commit is contained in:
rpa (Open ERP)
2010-07-20 11:41:47 +05:30
parent a835bb2545
commit bdef8968ee
+3 -1
View File
@@ -187,12 +187,14 @@ class crm_lead_forward_to_partner(osv.osv_memory):
email_re = r'([^ ,<@]+@[^> ,]+)'
email_cc = re.findall(email_re, case.email_cc or '')
new_cc = []
if case.email_cc:
new_cc.append(case.email_cc)
for to in this.email_to.split(','):
email_to = re.findall(email_re, to)
email_to = email_to and email_to[0] or ''
if email_to not in email_cc:
new_cc.append(to)
to_write.update({'email_cc' : case.email_cc or '' + ','.join(new_cc)})
to_write.update({'email_cc' : ', '.join(new_cc) })
case_pool.write(cr, uid, case.id, to_write, context=context)
return {}