[FIX] _read_flat() method corrected for multi

lp bug: https://launchpad.net/bugs/625898 fixed

bzr revid: ach@tinyerp.com-20101015134630-law0exawyhlyec30
This commit is contained in:
Anup (OpenERP) 2010-10-15 19:16:30 +05:30
parent f70f0d4520
commit acf5105783
1 changed files with 3 additions and 1 deletions

View File

@ -3107,7 +3107,9 @@ class orm(orm_template):
for pos in val:
for record in res:
if isinstance(res2[record['id']], str): res2[record['id']] = eval(res2[record['id']]) #TOCHECK : why got string instend of dict in python2.6
record[pos] = res2[record['id']][pos]
multi_fields = res2.get(record['id'],{})
if multi_fields:
record[pos] = multi_fields.get(pos,[])
else:
for f in val:
res2 = self._columns[f].get(cr, self, ids, f, user, context=context, values=res)