diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index 13d7531724..120b24d83b 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -490,6 +490,9 @@ class ORM(object): "SET \"%s\" = NULL" % \ (self._table, k)) else: + if isinstance(field, fields.Many2One) \ + and isinstance(default, (list, tuple)): + default = default[0] cursor.execute("UPDATE \"%s\" " \ "SET \"%s\" = '%s'" % \ (self._table, k, default))