From 47737200fa2bcec41e03b55b08a50f7909e6437f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 6 Mar 2020 23:14:24 +0100 Subject: [PATCH] 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 --- tryton/common/domain_inversion.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tryton/common/domain_inversion.py b/tryton/common/domain_inversion.py index 7f2ed03e1f..620ed8d35e 100644 --- a/tryton/common/domain_inversion.py +++ b/tryton/common/domain_inversion.py @@ -370,9 +370,8 @@ class Or(And): 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