changeset 55a171da148d in trytond:5.8
details: https://hg.tryton.org/trytond?cmd=changeset;node=55a171da148d
description:
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
(grafted from 9ea9c35fbfe20287e8ef24ac623f5e03caa0c3bd)
diffstat:
trytond/model/modelsql.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r 97fb3546be98 -r 55a171da148d trytond/model/modelsql.py
--- a/trytond/model/modelsql.py Mon Nov 23 23:33:59 2020 +0100
+++ b/trytond/model/modelsql.py Mon Nov 23 23:43:01 2020 +0100
@@ -741,11 +741,11 @@
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