From cd4701d2b77353a30886fcd7e14d3e3f75fb5b92 Mon Sep 17 00:00:00 2001 From: Raimon Esteve Date: Mon, 23 Oct 2023 08:21:38 +0200 Subject: [PATCH] Add issue12590.diff [account_payment] Do not test active clause of dunning being in a set --- issue12590.diff | 16 ++++++++++++++++ series | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 issue12590.diff diff --git a/issue12590.diff b/issue12590.diff new file mode 100644 index 0000000..a7df161 --- /dev/null +++ b/issue12590.diff @@ -0,0 +1,16 @@ +diff --git a/tryton/modules/account_payment/account.py b/tryton/modules/account_payment/account.py +index 112c8e1f2c..3a5b860aec 100644 +--- a/tryton/modules/account_payment/account.py ++++ b/tryton/modules/account_payment/account.py +@@ -699,9 +699,9 @@ class Dunning(metaclass=PoolMeta): + + @classmethod + def search_active(cls, name, clause): +- if tuple(clause[1:]) in {('=', True), ('!=', False)}: ++ if tuple(clause[1:]) in [('=', True), ('!=', False)]: + domain = ('line.payment_amount', '>', 0) +- elif tuple(clause[1:]) in {('=', False), ('!=', True)}: ++ elif tuple(clause[1:]) in [('=', False), ('!=', True)]: + domain = ('line.payment_amount', '<=', 0) + else: + domain = [] diff --git a/series b/series index 6daa3f8..152ce8b 100644 --- a/series +++ b/series @@ -117,3 +117,5 @@ issue7672.diff # [stock] Always fill product and template of cost price revision sale_purchase_relate_lines.diff # [sale] [purchase] Add relates to sale and purchase lines from party and product issue12570.diff # [account] Do not compute account party for general ledger line without party + +issue12590.diff # [account_payment] Do not test active clause of dunning being in a set