[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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user