[FIX] Export : _rec_name should be used instead of hardcoded name for relational records (Ref: SaaS Maintenance case 3921)

bzr revid: jvo@tinyerp.com-20110201100358-330mo3u3ufbycelv
This commit is contained in:
Jay Vora (OpenERP) 2011-02-01 15:33:58 +05:30
parent 8d225e0ef2
commit d562af0f5c
1 changed files with 3 additions and 2 deletions

View File

@ -620,8 +620,9 @@ class orm_template(object):
if not data[fpos]:
dt = ''
for rr in r:
if isinstance(rr.name, browse_record):
rr = rr.name
name_relation = self.pool.get(rr._table_name)._rec_name
if isinstance(rr[name_relation], browse_record):
rr = rr[name_relation]
rr_name = self.pool.get(rr._table_name).name_get(cr, uid, [rr.id], context=context)
rr_name = rr_name and rr_name[0] and rr_name[0][1] or ''
dt += tools.ustr(rr_name or '') + ','