Do not match direct debit reception with SEPA mandate that is not validated
Closes #14738 (grafted from d4c4995588f34828b90adf0fa53d85d9a6d3687f) --HG-- branch : 7.0
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user