[IMP] res.partner.address: in name_search, search on partner_id before other fields

bzr revid: rco@openerp.com-20120321132139-5bx0mn6hod749itq
This commit is contained in:
Raphael Collet 2012-03-21 14:21:39 +01:00
parent f53b5f3df2
commit 2e5554e6bc
1 changed files with 1 additions and 1 deletions

View File

@ -359,7 +359,7 @@ class res_partner_address(osv.osv):
ids = self.search(cr, user, [('zip', '=', name)] + args, limit=limit, context=context)
# then search on other fields:
if context.get('contact_display', 'contact')=='partner_address':
fields = ['name', 'country_id', 'city', 'street', 'partner_id']
fields = ['partner_id', 'name', 'country_id', 'city', 'street']
else:
fields = ['name', 'country_id', 'city', 'street']
# Here we have to search the records that satisfy the domain: