From e30db1edfcca60e892c052460edb2f9b88c7e720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 9 Oct 2024 20:13:30 +0200 Subject: [PATCH] Explicitly set boolean operator to compose domain of current name of budget line Closes #13580 (grafted from 71b69144ef2141d9b571a90a2b82017c20a909f2) --HG-- branch : 7.0 --- modules/account_budget/account.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/account_budget/account.py b/modules/account_budget/account.py index 63f8d80652..fefbb56179 100644 --- a/modules/account_budget/account.py +++ b/modules/account_budget/account.py @@ -515,7 +515,12 @@ class BudgetLine(BudgetLineMixin, ModelSQL, ModelView): @classmethod def search_current_name(cls, name, clause): - return super().search_current_name(name, clause) + [ + if clause[1].startswith('!') or clause[1].startswith('not '): + bool_op = 'AND' + else: + bool_op = 'OR' + return [bool_op, + super().search_current_name(name, clause), ('account_type.name',) + tuple(clause[1:]), ]