[FIX] crm: if email_from was not valid, the convert of lead to opportunity was crashing with 'list index out of range' error (trying to reach first element of []). FP-style merge to correct the inner commit message
bzr revid: qdp-launchpad@openerp.com-20130227124440-9z6c9hzsi1tb7rau
This commit is contained in:
commit
b4949e3ca4
|
@ -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