From: Anup (OpenERP) Date: Fri, 15 Oct 2010 13:46:30 +0000 (+0530) Subject: [FIX] _read_flat() method corrected for multi X-Git-Tag: 6.0.0-rc1-server~49^2~3 X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=acf51057835ee0e12a6e73730217d239bd98a477;p=odoo%2Fodoo.git [FIX] _read_flat() method corrected for multi lp bug: https://launchpad.net/bugs/625898 fixed bzr revid: ach@tinyerp.com-20101015134630-law0exawyhlyec30 --- 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)