[FIX] crm: if email_from was not valid, the merge of lead was crashing with 'list index out of range' error (trying to reach first element of [])
bzr revid: qdp-launchpad@openerp.com-20130227121506-guwlypemmyl2tvgk
This commit is contained in:
parent
95ac70f834
commit
d1219f9a97
|
@ -711,7 +711,7 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
'parent_id': parent_id,
|
||||
'phone': lead.phone,
|
||||
'mobile': lead.mobile,
|
||||
'email': lead.email_from and tools.email_split(lead.email_from)[0],
|
||||
'email': tools.email_split(lead.email_from) and tools.email_split(lead.email_from)[0] or False,
|
||||
'fax': lead.fax,
|
||||
'title': lead.title and lead.title.id or False,
|
||||
'function': lead.function,
|
||||
|
|
Loading…
Reference in New Issue