[MERGE] (Manual) Foward-port of addons 7.0 bugfix revid:odo@openerp.com-2013081308224...
authorOlivier Dony <odo@openerp.com>
Tue, 20 Aug 2013 15:20:25 +0000 (17:20 +0200)
committerOlivier Dony <odo@openerp.com>
Tue, 20 Aug 2013 15:20:25 +0000 (17:20 +0200)
res.partner: avoid including the address in the computed display name

bzr revid: odo@openerp.com-20130820152025-3yt7gtnaeztdt1nh

openerp/addons/base/res/res_partner.py

index b8172de..affcf1a 100644 (file)
@@ -208,6 +208,8 @@ class res_partner(osv.osv, format_address):
         return result
 
     def _display_name_compute(self, cr, uid, ids, name, args, context=None):
+        context = dict(context or {})
+        context.pop('show_address', None)
         return dict(self.name_get(cr, uid, ids, context=context))
 
     # indirections to avoid passing a copy of the overridable method when declaring the function field