Valencia Rodrigues (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-opw-17182_remove_old_name-vro into 
lp:openobject-addons/6.0.

Requested reviews:
  Raphael Collet (OpenERP) (rco-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-17182_remove_old_name-vro/+merge/76959

Hello,

Before the module 'base_contact' is installed, the address line would append 
the name of the contact present in the Partner Address (res.partner.address) 
object. But if the module 'base_contact' is used, we no longer use the address 
object to store contact name, instead, the Contact (res.partner.contact) object 
is used for the same.

Each contact may have multiple related addresses (Contacts form - Functions and 
Addresses). And similarly, one address may feature in among many contacts, 
hence it is no longer feasible to append a contact name to the address.

The contact address seems contaminated in the following scenario (DB with demo 
data):
1. Create a new contact from Sales > Address Book > Contacts
2. Select 'Bank Wealthy and sons' as the Address
3. Notice that the name 'Arthur Grosbonnet' is prefixed in the address.

This fixes the issue.

Thanks
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-17182_remove_old_name-vro/+merge/76959
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-opw-17182_remove_old_name-vro.
=== modified file 'base_contact/base_contact.py'
--- base_contact/base_contact.py	2011-09-12 12:20:47 +0000
+++ base_contact/base_contact.py	2011-09-26 10:47:18 +0000
@@ -133,12 +133,11 @@
         res = []
         if context is None:
             context = {}
-        for r in self.read(cr, user, ids, ['zip', 'city', 'partner_id', 'street', 'name']):
+        for r in self.read(cr, user, ids, ['zip', 'city', 'partner_id', 'street']):
             if context.get('contact_display', 'contact')=='partner' and r['partner_id']:
                 res.append((r['id'], r['partner_id'][1]))
             else:
-                addr = r['name'] or ''
-                addr += " %s %s %s" % (r.get('street', '') or '', r.get('zip', '') \
+                addr = "%s %s %s" % (r.get('street', '') or '', r.get('zip', '') \
                                     or '', r.get('city', '') or '')
                 res.append((r['id'], addr.strip() or '/'))
         return res

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to