From 4e4c02351f9bc600632f2f5def0b83c30bd48d39 Mon Sep 17 00:00:00 2001 From: "P. Christeas" Date: Tue, 18 Nov 2008 16:33:18 +0200 Subject: [PATCH] Orm: model fields may be a subset of the views. When the view asks more fields than the OM has, the result may have less ones. Iterate through the smallest set. bzr revid: p_christ@hol.gr-20081118143318-vvns3suey0g4e3x6 --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 0571bbbd99e..385812e37ea 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -852,7 +852,7 @@ class orm_template(object): arch = node.toxml(encoding="utf-8").replace('\t', '') fields = self.fields_get(cr, user, fields_def.keys(), context) - for field in fields_def: + for field in fields: fields[field].update(fields_def[field]) return arch, fields