Fix: allow to call write with one id

This commit is contained in:
Bertrand Chenal committed 2009-04-06 16:44:55 +02:00
1 parent ea36031dfc
commit 8a86fbf816
1 file changed
+2
+2
View File
@@ -161,6 +161,8 @@ class Uom(ModelSQL, ModelView):
return super(Uom, self).create(cursor, user, values, context)
def write(self, cursor, user, ids, values, context=None):
if isinstance(ids, (int, long)):
ids = [ids]
if 'rate' in values or 'factor' in values or 'category' in values:
uoms = self.browse(cursor, user, ids, context=context)
for uom in uoms: