Validate non-loaded O2M record when new and pass missing softvalidation

issue2968
review637003
This commit is contained in:
Cédric Krier committed 2013-01-26 15:07:23 +01:00
1 parent 18bb035224
commit f3ec7bb30b
1 file changed
+2 -2
+2 -2
View File
@@ -730,9 +730,9 @@ class O2MField(CharField):
return True
res = True
for record2 in record.value.get(self.name, []):
if not record2.loaded:
if not record2.loaded and record2.id >= 0:
continue
if not record2.validate():
if not record2.validate(softvalidation=softvalidation):
if not record2.modified:
record.value[self.name].remove(record2)
else: