From 9b9c3fa59cb7ced71f3607a67ec3836804510dca Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 19 Apr 2013 18:47:28 +0200 Subject: [PATCH] [FIX] res.partner.name_get: partners marked as "is_company" should appear as standalone This is more consistent with the way we expect reporting to work, and will also ensure that these companies appear right above their contacts in search order (which will match name_get) bzr revid: odo@openerp.com-20130419164728-25312wtyzt9h6egw --- openerp/addons/base/res/res_partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_partner.py b/openerp/addons/base/res/res_partner.py index d29e153e907..2637b922f8c 100644 --- a/openerp/addons/base/res/res_partner.py +++ b/openerp/addons/base/res/res_partner.py @@ -528,7 +528,7 @@ class res_partner(osv.osv, format_address): res = [] for record in self.browse(cr, uid, ids, context=context): name = record.name - if record.parent_id: + if record.parent_id and not record.is_company: name = "%s, %s" % (record.parent_id.name, name) if context.get('show_address'): name = name + "\n" + self._display_address(cr, uid, record, without_company=True, context=context)