From 08ca917d5bd1e6ca87f2db2f3bf26fa48c6ef541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 31 Jan 2013 17:09:24 +0100 Subject: [PATCH] [FIX] Fixed the fix, because actually we could have a contact_email and not a contact_name according to the regex. Should be working fine now. bzr revid: tde@openerp.com-20130131160924-cp0xcj7nm7zbb07v --- addons/crm/crm_lead.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 7575389093b..6603a1ab096 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -750,6 +750,8 @@ class crm_lead(base_stage, format_address, osv.osv): partner_id = self._lead_create_contact(cr, uid, lead, lead.contact_name, False, context=context) elif lead.email_from: contact_name, contact_email = self.pool.get('res.partner')._parse_partner_name(lead.email_from, context=context) + if not contact_name and contact_email: + contact_name = contact_email partner_id = self._lead_create_contact(cr, uid, lead, contact_name, False, context=context) else: partner_id = self._lead_create_contact(cr, uid, lead, lead.name, False, context=context)