changeset a0edab84147f in tryton:5.4
details: https://hg.tryton.org/tryton?cmd=changeset;node=a0edab84147f
description:
        Do not force value in OR-ed clause

        When any other variable in Or-ed clause is not known, we can not force 
the
        value of the variable.

        issue9092
        review272941002
        (grafted from 245127e0ab342a02efac802ea8e117075caac0de)
diffstat:

 tryton/common/domain_inversion.py |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (15 lines):

diff -r d31550e120a6 -r a0edab84147f tryton/common/domain_inversion.py
--- a/tryton/common/domain_inversion.py Thu Mar 05 00:22:19 2020 +0100
+++ b/tryton/common/domain_inversion.py Fri Mar 06 23:14:24 2020 +0100
@@ -370,9 +370,8 @@
     def inverse(self, symbol, context):
         result = []
         known_variables = set(context.keys())
-        if (symbol not in self.variables
-                and not known_variables >= self.variables):
-            # In this case we don't know anything about this OR part, we
+        if not known_variables >= (self.variables - {symbol}):
+            # In this case we don't know enough about this OR part, we
             # consider it to be True (because people will have the constraint
             # on this part later).
             return True

Reply via email to