[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:
Quentin (OpenERP) 2013-02-27 13:44:40 +01:00
commit b4949e3ca4
1 changed files with 1 additions and 1 deletions

View File

@ -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,