[FIX] orm: fixed for python2.6 in _read_flat method

bzr revid: hmo@tinyerp.com-20100127104735-0d249mz7szb13uwo
This commit is contained in:
Harry (Open ERP) 2010-01-27 16:17:35 +05:30
parent 1011c0fffa
commit 38ba65c24b
1 changed files with 2 additions and 1 deletions

View File

@ -2424,7 +2424,7 @@ class orm(orm_template):
def _read_flat(self, cr, user, ids, fields_to_read, context=None, load='_classic_read'):
if not context:
context = {}
#ids = map(lambda x:int(x), ids)
#ids = map(lambda x:int(x), ids)
if not ids:
return []
if fields_to_read == None:
@ -2520,6 +2520,7 @@ class orm(orm_template):
res2 = self._columns[val[0]].get(cr, self, ids, val, user, context=context, values=res)
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]
else:
for f in val: