changeset 04d89a6a8e57 in modules/party:default
details: https://hg.tryton.org/modules/party?cmd=changeset&node=04d89a6a8e57
description:
Use AND-ed clause when searching contact mechanism with negate operator
issue10309
review334201002
diffstat:
contact_mechanism.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (16 lines):
diff -r 6f4256e8e68d -r 04d89a6a8e57 contact_mechanism.py
--- a/contact_mechanism.py Sun Apr 11 18:37:41 2021 +0200
+++ b/contact_mechanism.py Thu Apr 22 23:50:08 2021 +0200
@@ -212,7 +212,11 @@
@classmethod
def search_rec_name(cls, name, clause):
- return ['OR',
+ if clause[1].startswith('!') or clause[1].startswith('not '):
+ bool_op = 'AND'
+ else:
+ bool_op = 'OR'
+ return [bool_op,
('value',) + tuple(clause[1:]),
('value_compact',) + tuple(clause[1:]),
]