diff --git a/__init__.py b/__init__.py index 17457a9bad..f3223e03cc 100644 --- a/__init__.py +++ b/__init__.py @@ -18,6 +18,9 @@ def register(): account.Configuration, account.ConfigurationSepaMandateSequence, module='account_payment_sepa', type_='model') + Pool.register( + party.Replace, + module='account_payment_sepa', type_='wizard') Pool.register( payment.MandateReport, module='account_payment_sepa', type_='report') diff --git a/party.py b/party.py index 9ff547666f..6c24ed437b 100644 --- a/party.py +++ b/party.py @@ -108,3 +108,13 @@ class PartyIdentifier(metaclass=PoolMeta): elif self.type == 'es_nif': identifier['Id'] += self.sepa_es_suffix or '000' return identifier + + +class Replace(metaclass=PoolMeta): + __name__ = 'party.replace' + + @classmethod + def fields_to_replace(cls): + return super().fields_to_replace() + [ + ('account.payment.sepa.mandate', 'party'), + ]