summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-01-31 17:09:24 +0100
committerThibault Delavallée <tde@openerp.com>2013-01-31 17:09:24 +0100
commit08ca917d5bd1e6ca87f2db2f3bf26fa48c6ef541 (patch)
tree9e6c5b3d6734615b02725aede80bfc7265353d78
parentcc79a9b3b62dd5fd5a5c40fb399f0fcc96acb83f (diff)
[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
-rw-r--r--addons/crm/crm_lead.py2
1 files changed, 2 insertions, 0 deletions
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)