From 2fc5214e4fc147c822e5ac096ae6700d6bcb50e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 21 Mar 2013 21:40:10 +0100 Subject: [PATCH] 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 --- trytond/model/modelsql.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/trytond/model/modelsql.py b/trytond/model/modelsql.py index a6d1fde689..ac38a10611 100644 --- a/trytond/model/modelsql.py +++ b/trytond/model/modelsql.py @@ -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: