From 6acee33b4ea931747895c373cd0b3c352d95f372 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Wed, 22 Sep 2010 11:23:49 +0200 Subject: [PATCH] [FIX] osv.fields: fromkeys second argument is only evaluated once bzr revid: olt@tinyerp.com-20100922092349-ab36ynbdzqvexryb --- bin/osv/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/fields.py b/bin/osv/fields.py index 3ab140e4088..64432ba15d7 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -777,7 +777,7 @@ class related(function): if not ids: return {} relation = obj._name if self._type in ('one2many', 'many2many'): - res = {}.fromkeys(ids, []) + res = dict([(i, []) for i in ids]) else: res = {}.fromkeys(ids, False)