Do not check for missing parent depends when the One2Many is readonly

Closes #14526
This commit is contained in:
Cédric Krier
2026-01-20 17:31:26 +01:00
parent 7573e8fbfd
commit bddbc06222
+2 -1
View File
@@ -607,7 +607,8 @@ class ModuleTestCase(_DBTestCase):
for tfield in target._fields.values():
if (tfield._type == 'one2many'
and tfield.model_name == mname
and tfield.field == depend):
and tfield.field == depend
and not tfield.readonly):
self.assertIn('_parent_%s' % depend, parent_depends,
msg='Missing "_parent_%s" in %s' % (
depend, qualname))