From acf51057835ee0e12a6e73730217d239bd98a477 Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Fri, 15 Oct 2010 19:16:30 +0530 Subject: [PATCH] [FIX] _read_flat() method corrected for multi lp bug: https://launchpad.net/bugs/625898 fixed bzr revid: ach@tinyerp.com-20101015134630-law0exawyhlyec30 --- bin/osv/orm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 3dc973d..91bd912 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -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) -- 1.7.10.4