KERNEL: fix set without values
bzr revid: ced-99c94e6837162feb3398c9c5fd7480ab182c02b0
This commit is contained in:
parent
dba41eb31e
commit
ae9ff0f6c5
|
@ -329,6 +329,8 @@ class one2many(_column):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def set(self, cr, obj, id, field, values, user=None, context={}):
|
def set(self, cr, obj, id, field, values, user=None, context={}):
|
||||||
|
if not values:
|
||||||
|
return
|
||||||
_table = obj.pool.get(self._obj)._table
|
_table = obj.pool.get(self._obj)._table
|
||||||
obj = obj.pool.get(self._obj)
|
obj = obj.pool.get(self._obj)
|
||||||
for act in values:
|
for act in values:
|
||||||
|
@ -387,6 +389,8 @@ class many2many(_column):
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def set(self, cr, obj, id, name, values, user=None, context={}):
|
def set(self, cr, obj, id, name, values, user=None, context={}):
|
||||||
|
if not values:
|
||||||
|
return
|
||||||
obj = obj.pool.get(self._obj)
|
obj = obj.pool.get(self._obj)
|
||||||
for act in values:
|
for act in values:
|
||||||
if act[0]==0:
|
if act[0]==0:
|
||||||
|
|
Loading…
Reference in New Issue