base_contact wrong creation of res.partner.address record
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Invalid
|
Low
|
OpenERP R&D Addons Team 1 |
Bug Description
In V6.1, with crm and base_contact installed: when you convert a lead into an opportunity, the contact information is lost, and the created res.partner.address has no associated res.partner.contact (name, mobile and title info is lost)
The reason is an error on module base_contact, not creating the record on create method overwrite
For sure is impacting on any module thats creates partner addresses not aware of base_contact.
Correction is attached:
=== modified file 'base_contact/
--- base_contact/
+++ base_contact/
@@ -220,6 +220,30 @@
}, context=context)
+ if not data.get(
+ first_name = ''
+ last_name = ''
+ if data.get('name', False):
+ name = data.get(
+ words = name.split(",")
+ if len(words) > 1:
+ last_name = words[0].strip()
+ first_name = ",".join(
+ else:
+ words = name.split(" ")
+ if len(words) == 1:
+ last_name = words[0].strip()
+ first_name = ''
+ else:
+ first_name = words[0].strip()
+ last_name = " ".join(
+ contact_id = self.pool.
+ 'mobile': data.get(
+ 'title': data.get(
+ 'first_name': first_name,
+ 'last_name': last_name,
+ }, context=context)
+ data['contact_id'] = contact_id
result = super(res_
return result
Changed in openobject-addons: | |
status: | New → Confirmed |
importance: | Undecided → Low |
assignee: | nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1) |
Could you attach this as a separate file to the bug? Launchpad has no respect for whitespace, and Python has no respect for those who don't indent. :-)