Remove left/right check on create
It was introduced in changeset c7804c288ca3 but tools like proteus will set the value on creation because there is a default value on such field as they are required. So such test is not doable on creation. issue3019
This commit is contained in:
1 parent
15961b9e67
commit
2fc5214e4f
1 file changed
-5
@@ -381,11 +381,6 @@ class ModelSQL(ModelStorage):
|
||||
if (isinstance(field, fields.Many2One)
|
||||
and field.model_name == cls.__name__
|
||||
and field.left and field.right):
|
||||
if (field.left in modified_fields
|
||||
or field.right in modified_fields):
|
||||
raise Exception('ValidateError',
|
||||
'You can not update fields: "%s", "%s"' %
|
||||
(field.left, field.right))
|
||||
if len(new_ids) == 1:
|
||||
cls._update_tree(new_ids[0], k, field.left, field.right)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user