changeset a83343ccb777 in modules/account_payment_sepa:default
details: 
https://hg.tryton.org/modules/account_payment_sepa?cmd=changeset&node=a83343ccb777
description:
        Update SEPA mandate on party replace

        issue10553
        review358871002
diffstat:

 __init__.py |   3 +++
 party.py    |  10 ++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diffs (29 lines):

diff -r e7da72126c58 -r a83343ccb777 __init__.py
--- a/__init__.py       Thu Sep 02 23:19:36 2021 +0200
+++ b/__init__.py       Fri Sep 10 19:33:26 2021 +0200
@@ -19,5 +19,8 @@
         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 -r e7da72126c58 -r a83343ccb777 party.py
--- a/party.py  Thu Sep 02 23:19:36 2021 +0200
+++ b/party.py  Fri Sep 10 19:33:26 2021 +0200
@@ -108,3 +108,13 @@
         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'),
+            ]

Reply via email to