Do not use One2Many with filter to get MultiValue records

The filter may prevent to find the right value.

Closes #12078
This commit is contained in:
Cédric Krier committed 2023-02-10 16:10:08 +01:00
1 parent 88aa08904c
commit de8d5477a0
1 file changed
+2 -1
+2 -1
View File
@@ -22,7 +22,8 @@ class MultiValueMixin(object):
Value = self.multivalue_model(field)
for fname, field in self._fields.items():
if (field._type == 'one2many'
and field.model_name == Value.__name__):
and field.model_name == Value.__name__
and not field.filter):
return getattr(self, fname)
return Value.search([])