From 51631fefbb16b58fc04d1a595be31de0ac8eb5dd Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Wed, 8 Dec 2010 18:11:27 +0530 Subject: [PATCH] [FIX] Fixed the read() method in orm_memory lp bug: https://launchpad.net/bugs/366089 fixed bzr revid: ach@tinyerp.com-20101208124127-z3q9ctf91vur0f5m --- bin/osv/orm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 346aaa7..8398213 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1514,6 +1514,7 @@ class orm_memory(orm_template): fields_to_read = self._columns.keys() result = [] if self.datas: + ids_orig = ids if isinstance(ids, (int, long)): ids = [ids] for id in ids: @@ -1531,7 +1532,7 @@ class orm_memory(orm_template): res2 = self._columns[f].get_memory(cr, self, ids, f, user, context=context, values=result) for record in result: record[f] = res2[record['id']] - if isinstance(ids, (int, long)): + if isinstance(ids_orig, (int, long)): return result[0] return result -- 1.7.10.4