diff --git a/modules/account_payment_sepa/party.py b/modules/account_payment_sepa/party.py index 3af55e60e4..a0a18a64a0 100644 --- a/modules/account_payment_sepa/party.py +++ b/modules/account_payment_sepa/party.py @@ -69,6 +69,13 @@ class PartyReceptionDirectDebit(metaclass=PoolMeta): 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'