Cédric Krier pushed to branch branch/default at Tryton / Tryton


Commits:
ddda112e by Cédric Krier at 2023-02-10T16:10:08+01:00
Do not use One2Many with filter to get MultiValue records

The filter may prevent to find the right value.

Closes #12078
- - - - -


1 changed file:

- trytond/trytond/model/multivalue.py


Changes:

=====================================
trytond/trytond/model/multivalue.py
=====================================
@@ -22,7 +22,8 @@
         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([])
 



View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/ddda112e1c42deefa7e03473cfad84542c6d17d4

-- 
View it on Heptapod: 
https://foss.heptapod.net/tryton/tryton/-/commit/ddda112e1c42deefa7e03473cfad84542c6d17d4
You're receiving this email because of your account on foss.heptapod.net.


Reply via email to