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:
1 parent
88aa08904c
commit
de8d5477a0
1 file changed
+2
-1
@@ -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([])
|
||||
|
||||
|
||||
Reference in new issue
Block a user