changeset 9ea9c35fbfe2 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=9ea9c35fbfe2
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
diffstat:
trytond/model/modelsql.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (17 lines):
diff -r 13c1e1b1e87e -r 9ea9c35fbfe2 trytond/model/modelsql.py
--- a/trytond/model/modelsql.py Mon Nov 23 23:35:03 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