Remove old test in write to update MPTT for only one record at a time
This commit is contained in:
1 parent
6f179949ed
commit
e403e8bc95
1 file changed
-12
@@ -651,18 +651,6 @@ class ModelSQL(ModelStorage):
|
||||
|
||||
values = values.copy()
|
||||
|
||||
# _update_tree works if only one record has changed
|
||||
update_tree = False
|
||||
for field in cls._fields.itervalues():
|
||||
if (isinstance(field, fields.Many2One)
|
||||
and field.model_name == cls.__name__
|
||||
and field.left and field.right):
|
||||
update_tree = True
|
||||
if update_tree and len(records) > 1:
|
||||
for record in records:
|
||||
cls.write([record], values)
|
||||
return
|
||||
|
||||
cls.__check_timestamp(ids)
|
||||
|
||||
# Clean values
|
||||
|
||||
Reference in new issue
Block a user