changeset 8ae6250bbab3 in tryton:5.0
details: https://hg.tryton.org/tryton?cmd=changeset;node=8ae6250bbab3
description:
        Skip invalid branch of domain without the inverted field

        Those branches of the domain should not prevent to compute a proper 
inverted
        domain for the field as the other fields will be fixed later.

        issue9200
        review311191002
        (grafted from f6f4d5759eaa100f58a91e9096fb9b448e4f233f)
diffstat:

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

diffs (12 lines):

diff -r a20df2035f13 -r 8ae6250bbab3 tryton/common/domain_inversion.py
--- a/tryton/common/domain_inversion.py Fri Apr 10 18:32:55 2020 +0200
+++ b/tryton/common/domain_inversion.py Sun Apr 12 23:21:08 2020 +0200
@@ -334,6 +334,8 @@
             if isinstance(part, And):
                 part_inversion = part.inverse(symbol, context)
                 evaluated = isinstance(part_inversion, bool)
+                if symbol not in part.variables:
+                    continue
                 if not evaluated:
                     result.append(part_inversion)
                 elif part_inversion:

Reply via email to