Don't validate record on one2many that are not loaded
This commit is contained in:
1 parent
8af7733f84
commit
751ef770d9
1 file changed
+2
@@ -475,6 +475,8 @@ class O2MField(CharField):
|
||||
def validate(self, model):
|
||||
res = True
|
||||
for model2 in model.value[self.name].models:
|
||||
if not model2.loaded:
|
||||
continue
|
||||
if not model2.validate():
|
||||
if not model2.is_modified():
|
||||
model.value[self.name].models.remove(model2)
|
||||
|
||||
Reference in new issue
Block a user