From 9c287abc143a7b187635c75751a29baeefa58c15 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 7 Feb 2011 11:26:52 +0100 Subject: [PATCH] [FIX] fields.o2m.set(): typo in previous commit, should pass IDs as list to write() bzr revid: odo@openerp.com-20110207102652-gkgyp5uqo0nk454a --- 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 153adac6e86..8a8ff465c7a 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -502,7 +502,7 @@ class one2many(_column): cr.execute('update '+_table+' set '+self._fields_id+'=null where id=%s', (act[1],)) elif act[0] == 4: # Must use write() to recompute parent_store structure if needed - obj.write(cr, user, act[1], {self._fields_id:id}, context=context or {}) + obj.write(cr, user, [act[1]], {self._fields_id:id}, context=context or {}) elif act[0] == 5: cr.execute('update '+_table+' set '+self._fields_id+'=null where '+self._fields_id+'=%s', (id,)) elif act[0] == 6: