[IMP]:Display only the names of many2one fields in group_by

bzr revid: nch@tinyerp.com-20100125121818-r8qcdykcoe94f0ib
This commit is contained in:
nch@tinyerp.com 2010-01-25 17:48:18 +05:30
parent 6f0bc4330e
commit 3949e09d92
1 changed files with 3 additions and 0 deletions

View File

@ -1832,6 +1832,9 @@ class orm(orm_template):
data = self.read(cr, uid, alldata.keys(), [groupby], context=context)
for d in data:
if fget.has_key(groupby):
if fget[groupby]['type'] == 'many2one':
d[groupby] = d[groupby] and d[groupby][1] or ''
d['__domain'] = [(groupby,'=',alldata[d['id']][groupby] or False)] + domain
del alldata[d['id']][groupby]
d.update(alldata[d['id']])