From 993586497f862fdc05928bf09a68b9dd9ee51361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 21 Oct 2023 14:29:59 +0200 Subject: [PATCH] Do not test active clause of dunning being in a set The clause may contain unhashable types. Closes #12590 --- modules/account_payment/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/account_payment/account.py b/modules/account_payment/account.py index d8162ce4a7..4437a6af8d 100644 --- a/modules/account_payment/account.py +++ b/modules/account_payment/account.py @@ -749,9 +749,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 = []