details: https://code.tryton.org/tryton/commit/1844533a320d
branch: 7.0
user: Cédric Krier <[email protected]>
date: Thu Apr 02 15:33:36 2026 +0200
description:
Do not match direct debit reception with SEPA mandate that is not
validated
Closes #14738
(grafted from d4c4995588f34828b90adf0fa53d85d9a6d3687f)
diffstat:
modules/account_payment_sepa/party.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r 3d3a1f7a8db8 -r 1844533a320d modules/account_payment_sepa/party.py
--- a/modules/account_payment_sepa/party.py Thu Apr 02 10:26:27 2026 +0200
+++ b/modules/account_payment_sepa/party.py Thu Apr 02 15:33:36 2026 +0200
@@ -69,6 +69,13 @@
payment.sepa_mandate = self.sepa_mandate
return payment
+ def match(self, pattern, match_none=False):
+ result = super().match(pattern, match_none=match_none)
+ if (self.process_method == 'sepa'
+ and self.sepa_mandate.state != 'validated'):
+ result = False
+ return result
+
class PartyIdentifier(metaclass=PoolMeta):
__name__ = 'party.identifier'