summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2013-04-19 18:47:28 +0200
committerOlivier Dony <odo@openerp.com>2013-04-19 18:47:28 +0200
commit9b9c3fa59cb7ced71f3607a67ec3836804510dca (patch)
tree546e9961c0950c06d78c58f46ecb70cb830711c4
parent83feb1c46f72389002aa3b30251dc1f71c3b972d (diff)
[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
-rw-r--r--openerp/addons/base/res/res_partner.py2
1 files changed, 1 insertions, 1 deletions
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)