From 2d426ad6cef57dcf62cccf333d6ff8e1f66f1f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20BEAU=20-=20http=3A//www=2Eakretion=2Ecom?= <> Date: Wed, 13 Oct 2010 17:47:05 +0530 Subject: [PATCH] [FIX] Fields : correction on get() of O2M lp bug: https://launchpad.net/bugs/603708 fixed bzr revid: jvo@tinyerp.com-20101013121705-2dqetjqp9viavk0e --- bin/osv/fields.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/osv/fields.py b/bin/osv/fields.py index f4442761bb8..fddb9742fe1 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -457,7 +457,8 @@ class one2many(_column): ids2 = obj.pool.get(self._obj).search(cr, user, self._domain + [(self._fields_id, 'in', ids)], limit=self._limit, context=context) for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'): - res[r[self._fields_id]].append(r['id']) + if r[self._fields_id] in res: + res[r[self._fields_id]].append(r['id']) return res def set(self, cr, obj, id, field, values, user=None, context=None):