From 4f83dff4390a52975e97d0c0ea7ff1f99db3e601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 23 Nov 2020 23:43:01 +0100 Subject: [PATCH] Convert rule domain for _write and _delete without active test We must convert in ModelSQL.read the rule domains like the ModelSQL.write and ModelSQL.delete convert their rule without the active test to have the same result. issue9819 review300951006 --- trytond/model/modelsql.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trytond/model/modelsql.py b/trytond/model/modelsql.py index 74f77333f8..8eedc5a2b9 100644 --- a/trytond/model/modelsql.py +++ b/trytond/model/modelsql.py @@ -741,11 +741,11 @@ class ModelSQL(ModelStorage): if rule_domain: rule_tables = {None: (table, None)} rule_tables, rule_expression = cls.search_domain( - rule_domain, tables=rule_tables) + rule_domain, active_test=False, tables=rule_tables) if len(rule_tables) > 1: # The expression uses another table rule_tables, rule_expression = cls.search_domain( - rule_domain) + rule_domain, active_test=False) rule_from = convert_from(None, rule_tables) rule_table, _ = rule_tables[None] rule_where = rule_table.id == table.id