diff --git a/account_banking_pain_base/models/account_payment_order.py b/account_banking_pain_base/models/account_payment_order.py index 337b492c2bd9..46a7edca3e94 100644 --- a/account_banking_pain_base/models/account_payment_order.py +++ b/account_banking_pain_base/models/account_payment_order.py @@ -338,7 +338,11 @@ def _generate_start_payment_info_block( if gen_args["payment_method"] == "DD": payment_info.ReqdColltnDt = requested_date.strftime("%Y-%m-%d") else: - payment_info.ReqdExctnDt = requested_date.strftime("%Y-%m-%d") + if gen_args["pain_flavor"].startswith("pain.001.001.09"): + requested_exec_date = objectify.SubElement(payment_info, "ReqdExctnDt") + requested_exec_date.Dt = requested_date.strftime("%Y-%m-%d") + else: + payment_info.ReqdExctnDt = requested_date.strftime("%Y-%m-%d") return payment_info @api.model diff --git a/account_banking_sepa_credit_transfer/README.rst b/account_banking_sepa_credit_transfer/README.rst index 4eb633c93741..465e9d6edc2f 100644 --- a/account_banking_sepa_credit_transfer/README.rst +++ b/account_banking_sepa_credit_transfer/README.rst @@ -7,7 +7,7 @@ Account Banking SEPA Credit Transfer !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:030d7c0c67d71ed2090e394e21c684d619d36e02470521fdb9085695f3c8e793 + !! source digest: sha256:c7df40d51f52d293aed85c94f6cc0f82234cfc97f493eb2153345aade7fb14e8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -30,20 +30,18 @@ Account Banking SEPA Credit Transfer Module to export payment orders in SEPA XML file format. -SEPA PAIN (PAyment INitiation) is the new european standard for -Customer-to-Bank payment instructions. This module implements SEPA Credit -Transfer (SCT), more specifically PAIN versions 001.001.03, -001.001.04 and 001.001.05. It is part of the ISO 20022 standard, available on -https://www.iso20022.org. +`ISO 20022 `_ is the new international standard for +bank XML files. This module implements SEPA Credit +Transfer (SCT), more specifically ISO 20022 PAIN (PAyment INitiation) versions 001.001.03 +and 001.001.09. It follows the `SEPA credit transfer implementation guidelines `_ of the `European Payments Council `_. -The Implementation Guidelines for SEPA Credit Transfer published by the -European Payments Council (https://www.europeanpaymentscouncil.eu) use -PAIN version 001.001.03, so it's probably the version of PAIN that you should -try first. +This module also supports PAIN version 001.003.03 which is used in Germany. +You can read more about this in german on `ebics.de `_. -It also includes pain.001.003.03 which is used in Germany instead of 001.001.03. -You can read more about this here (only in german language): -http://www.ebics.de/startseite/ +Moreover, this module supports: + +* SEPA **instant** credit transfer, +* non-SEPA credit transfer files, which can be used for wire transfer in currencies other then euro and/or to countries outside the `SEPA zone `_. **Table of contents** diff --git a/account_banking_sepa_credit_transfer/data/account_payment_method.xml b/account_banking_sepa_credit_transfer/data/account_payment_method.xml index b8016e67cf59..e8b9528e3519 100644 --- a/account_banking_sepa_credit_transfer/data/account_payment_method.xml +++ b/account_banking_sepa_credit_transfer/data/account_payment_method.xml @@ -6,7 +6,7 @@ outbound - pain.001.001.03 + pain.001.001.09 diff --git a/account_banking_sepa_credit_transfer/data/pain.001.001.02.xsd b/account_banking_sepa_credit_transfer/data/pain.001.001.02.xsd deleted file mode 100644 index 51cedb95fd7a..000000000000 --- a/account_banking_sepa_credit_transfer/data/pain.001.001.02.xsd +++ /dev/null @@ -1,919 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/account_banking_sepa_credit_transfer/data/pain.001.001.04.xsd b/account_banking_sepa_credit_transfer/data/pain.001.001.04.xsd deleted file mode 100644 index 1628a52a6bd0..000000000000 --- a/account_banking_sepa_credit_transfer/data/pain.001.001.04.xsd +++ /dev/null @@ -1,1539 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd b/account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd deleted file mode 100644 index 9caf796e92de..000000000000 --- a/account_banking_sepa_credit_transfer/data/pain.001.001.05.xsd +++ /dev/null @@ -1,1504 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/account_banking_sepa_credit_transfer/data/pain.001.001.09.xsd b/account_banking_sepa_credit_transfer/data/pain.001.001.09.xsd new file mode 100644 index 000000000000..555d5b63940a --- /dev/null +++ b/account_banking_sepa_credit_transfer/data/pain.001.001.09.xsd @@ -0,0 +1,1114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/account_banking_sepa_credit_transfer/migrations/16.0.1.2.0/post-migration.py b/account_banking_sepa_credit_transfer/migrations/16.0.1.2.0/post-migration.py index bf98ae8f033b..70f3474095ba 100644 --- a/account_banking_sepa_credit_transfer/migrations/16.0.1.2.0/post-migration.py +++ b/account_banking_sepa_credit_transfer/migrations/16.0.1.2.0/post-migration.py @@ -8,4 +8,11 @@ @openupgrade.migrate() def migrate(env, version): sct_method = env.ref("account_banking_sepa_credit_transfer.sepa_credit_transfer") - sct_method.write({"payment_order_ok": True}) + vals = {"payment_order_ok": True} + if sct_method.pain_version in ( + "pain.001.001.02", + "pain.001.001.04", + "pain.001.001.05", + ): + vals["pain_version"] = "pain.001.001.03" + sct_method.write(vals) diff --git a/account_banking_sepa_credit_transfer/models/account_payment_method.py b/account_banking_sepa_credit_transfer/models/account_payment_method.py index 1323912eff0e..657c8da5322e 100644 --- a/account_banking_sepa_credit_transfer/models/account_payment_method.py +++ b/account_banking_sepa_credit_transfer/models/account_payment_method.py @@ -9,15 +9,19 @@ class AccountPaymentMethod(models.Model): pain_version = fields.Selection( selection_add=[ - ("pain.001.001.03", "pain.001.001.03 (recommended for credit transfer)"), - ("pain.001.001.04", "pain.001.001.04"), - ("pain.001.001.05", "pain.001.001.05"), - ("pain.001.003.03", "pain.001.003.03"), + ( + "pain.001.001.03", + "pain.001.001.03 (credit transfer, old recommended version)", + ), + ( + "pain.001.001.09", + "pain.001.001.09 (credit transfer, new recommended version)", + ), + ("pain.001.003.03", "pain.001.003.03 (credit transfer for Germany only)"), ], ondelete={ "pain.001.001.03": "set null", - "pain.001.001.04": "set null", - "pain.001.001.05": "set null", + "pain.001.001.09": "set null", "pain.001.003.03": "set null", }, ) @@ -26,8 +30,7 @@ def _get_xsd_file_path(self): self.ensure_one() if self.pain_version in [ "pain.001.001.03", - "pain.001.001.04", - "pain.001.001.05", + "pain.001.001.09", "pain.001.003.03", ]: path = ( diff --git a/account_banking_sepa_credit_transfer/models/account_payment_order.py b/account_banking_sepa_credit_transfer/models/account_payment_order.py index 8533c4d5f4f2..d520059e0b58 100644 --- a/account_banking_sepa_credit_transfer/models/account_payment_order.py +++ b/account_banking_sepa_credit_transfer/models/account_payment_order.py @@ -34,7 +34,7 @@ def generate_payment_file(self): # so we follow the "European Payment Council" # and we put 70 and not 140 name_maxsize = 70 - elif pain_flavor.startswith(("pain.001.001.04", "pain.001.001.05")): + elif pain_flavor.startswith("pain.001.001.09"): bic_xml_tag = "BICFI" name_maxsize = 140 # added pain.001.003.03 for German Banks diff --git a/account_banking_sepa_credit_transfer/readme/DESCRIPTION.rst b/account_banking_sepa_credit_transfer/readme/DESCRIPTION.rst index 2351dac7a5ad..85fecd4fd56e 100644 --- a/account_banking_sepa_credit_transfer/readme/DESCRIPTION.rst +++ b/account_banking_sepa_credit_transfer/readme/DESCRIPTION.rst @@ -1,16 +1,14 @@ Module to export payment orders in SEPA XML file format. -SEPA PAIN (PAyment INitiation) is the new european standard for -Customer-to-Bank payment instructions. This module implements SEPA Credit -Transfer (SCT), more specifically PAIN versions 001.001.03, -001.001.04 and 001.001.05. It is part of the ISO 20022 standard, available on -https://www.iso20022.org. +`ISO 20022 `_ is the new international standard for +bank XML files. This module implements SEPA Credit +Transfer (SCT), more specifically ISO 20022 PAIN (PAyment INitiation) versions 001.001.03 +and 001.001.09. It follows the `SEPA credit transfer implementation guidelines `_ of the `European Payments Council `_. -The Implementation Guidelines for SEPA Credit Transfer published by the -European Payments Council (https://www.europeanpaymentscouncil.eu) use -PAIN version 001.001.03, so it's probably the version of PAIN that you should -try first. +This module also supports PAIN version 001.003.03 which is used in Germany. +You can read more about this in german on `ebics.de `_. -It also includes pain.001.003.03 which is used in Germany instead of 001.001.03. -You can read more about this here (only in german language): -http://www.ebics.de/startseite/ +Moreover, this module supports: + +* SEPA **instant** credit transfer, +* non-SEPA credit transfer files, which can be used for wire transfer in currencies other then euro and/or to countries outside the `SEPA zone `_. diff --git a/account_banking_sepa_credit_transfer/static/description/index.html b/account_banking_sepa_credit_transfer/static/description/index.html index 42190c5d333c..09f31a45018a 100644 --- a/account_banking_sepa_credit_transfer/static/description/index.html +++ b/account_banking_sepa_credit_transfer/static/description/index.html @@ -367,22 +367,21 @@

Account Banking SEPA Credit Transfer

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:030d7c0c67d71ed2090e394e21c684d619d36e02470521fdb9085695f3c8e793 +!! source digest: sha256:c7df40d51f52d293aed85c94f6cc0f82234cfc97f493eb2153345aade7fb14e8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/bank-payment Translate me on Weblate Try me on Runboat

Module to export payment orders in SEPA XML file format.

-

SEPA PAIN (PAyment INitiation) is the new european standard for -Customer-to-Bank payment instructions. This module implements SEPA Credit -Transfer (SCT), more specifically PAIN versions 001.001.03, -001.001.04 and 001.001.05. It is part of the ISO 20022 standard, available on -https://www.iso20022.org.

-

The Implementation Guidelines for SEPA Credit Transfer published by the -European Payments Council (https://www.europeanpaymentscouncil.eu) use -PAIN version 001.001.03, so it’s probably the version of PAIN that you should -try first.

-

It also includes pain.001.003.03 which is used in Germany instead of 001.001.03. -You can read more about this here (only in german language): -http://www.ebics.de/startseite/

+

ISO 20022 is the new international standard for +bank XML files. This module implements SEPA Credit +Transfer (SCT), more specifically ISO 20022 PAIN (PAyment INitiation) versions 001.001.03 +and 001.001.09. It follows the SEPA credit transfer implementation guidelines of the European Payments Council.

+

This module also supports PAIN version 001.003.03 which is used in Germany. +You can read more about this in german on ebics.de.

+

Moreover, this module supports:

+
    +
  • SEPA instant credit transfer,
  • +
  • non-SEPA credit transfer files, which can be used for wire transfer in currencies other then euro and/or to countries outside the SEPA zone.
  • +

Table of contents

    diff --git a/account_banking_sepa_credit_transfer/tests/test_sct.py b/account_banking_sepa_credit_transfer/tests/test_sct.py index 5552133d58f6..0af87727385d 100644 --- a/account_banking_sepa_credit_transfer/tests/test_sct.py +++ b/account_banking_sepa_credit_transfer/tests/test_sct.py @@ -155,19 +155,15 @@ def test_no_pain(self): with self.assertRaises(UserError): self.check_eur_currency_sct() - def test_pain_001_03(self): + def test_pain_001_001_03(self): self.payment_mode.payment_method_id.pain_version = "pain.001.001.03" self.check_eur_currency_sct() - def test_pain_001_04(self): - self.payment_mode.payment_method_id.pain_version = "pain.001.001.04" + def test_pain_001_001_09(self): + self.payment_mode.payment_method_id.pain_version = "pain.001.001.09" self.check_eur_currency_sct() - def test_pain_001_05(self): - self.payment_mode.payment_method_id.pain_version = "pain.001.001.05" - self.check_eur_currency_sct() - - def test_pain_003_03(self): + def test_pain_001_003_03(self): self.payment_mode.payment_method_id.pain_version = "pain.001.003.03" self.check_eur_currency_sct() diff --git a/account_banking_sepa_direct_debit/README.rst b/account_banking_sepa_direct_debit/README.rst index 4974e3d333e0..812063c82f21 100644 --- a/account_banking_sepa_direct_debit/README.rst +++ b/account_banking_sepa_direct_debit/README.rst @@ -7,7 +7,7 @@ Account Banking SEPA Direct Debit !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:54d15a19d5ebcc37a1989d4ee96f33222b9a531640efd5bd6b8874f90e787edc + !! source digest: sha256:6c106e86beb875867d6b9a7dfd431164b6b1a230e4d3ef53d533af13e3f68401 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -28,20 +28,17 @@ Account Banking SEPA Direct Debit |badge1| |badge2| |badge3| |badge4| |badge5| -Create SEPA files for Direct Debit +Module to export direct debit orders in SEPA XML file format. -Module to export direct debit payment orders in SEPA XML file format. +`ISO 20022 `_ is the new international standard for +bank XML files. This module implements SEPA Direct +Debit (SDD), more specifically ISO 20022 PAIN (PAyment INitiation) versions 008.001.02 and 008.001.08. +It follows the `SEPA direct debit implementation guidelines `_ of the `European Payments Council `_. -SEPA PAIN (PAyment INitiation) is the new european standard for -Customer-to-Bank payment instructions. This module implements SEPA Direct -Debit (SDD), more specifically PAIN versions 008.001.02, 008.001.03 and -008.001.04. It is part of the ISO 20022 standard, available on -http://www.iso20022.org. +This module also supports PAIN version 008.003.02 which is used in Germany. +You can read more about this in german on `ebics.de `_. -The Implementation Guidelines for SEPA Direct Debit published by the European -Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN -version 008.001.02. So if you don't know which version your bank supports, you -should try version 008.001.02 first. +It supports both SEPA **Core** and SEPA **B2B** mandates. **Table of contents** diff --git a/account_banking_sepa_direct_debit/data/account_payment_method.xml b/account_banking_sepa_direct_debit/data/account_payment_method.xml index 9dceab9c56bf..ee6490849dac 100644 --- a/account_banking_sepa_direct_debit/data/account_payment_method.xml +++ b/account_banking_sepa_direct_debit/data/account_payment_method.xml @@ -7,7 +7,7 @@ - pain.008.001.02 + pain.008.001.08 diff --git a/account_banking_sepa_direct_debit/data/pain.008.001.03.xsd b/account_banking_sepa_direct_debit/data/pain.008.001.03.xsd deleted file mode 100644 index 6565640e6cdd..000000000000 --- a/account_banking_sepa_direct_debit/data/pain.008.001.03.xsd +++ /dev/null @@ -1,1494 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/account_banking_sepa_direct_debit/data/pain.008.001.04.xsd b/account_banking_sepa_direct_debit/data/pain.008.001.04.xsd deleted file mode 100644 index 759051ec0875..000000000000 --- a/account_banking_sepa_direct_debit/data/pain.008.001.04.xsd +++ /dev/null @@ -1,1463 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/account_banking_sepa_direct_debit/data/pain.008.001.08.xsd b/account_banking_sepa_direct_debit/data/pain.008.001.08.xsd new file mode 100644 index 000000000000..91f52315f191 --- /dev/null +++ b/account_banking_sepa_direct_debit/data/pain.008.001.08.xsd @@ -0,0 +1,1106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/account_banking_sepa_direct_debit/migrations/16.0.1.2.0/post-migration.py b/account_banking_sepa_direct_debit/migrations/16.0.1.2.0/post-migration.py index 4252c025d06d..3c78cfec2c72 100644 --- a/account_banking_sepa_direct_debit/migrations/16.0.1.2.0/post-migration.py +++ b/account_banking_sepa_direct_debit/migrations/16.0.1.2.0/post-migration.py @@ -7,5 +7,8 @@ @openupgrade.migrate() def migrate(env, version): - sct_method = env.ref("account_banking_sepa_direct_debit.sepa_direct_debit") - sct_method.write({"payment_order_ok": True}) + sdd_method = env.ref("account_banking_sepa_direct_debit.sepa_direct_debit") + vals = {"payment_order_ok": True} + if sdd_method.pain_version in ("pain.008.001.03", "pain.008.001.04"): + vals["pain_version"] = "pain.008.001.02" + sdd_method.write(vals) diff --git a/account_banking_sepa_direct_debit/models/account_payment_method.py b/account_banking_sepa_direct_debit/models/account_payment_method.py index b8a0a3e455d7..5d9b9e65c143 100644 --- a/account_banking_sepa_direct_debit/models/account_payment_method.py +++ b/account_banking_sepa_direct_debit/models/account_payment_method.py @@ -9,15 +9,19 @@ class AccountPaymentMethod(models.Model): pain_version = fields.Selection( selection_add=[ - ("pain.008.001.02", "pain.008.001.02 (recommended for direct debit)"), - ("pain.008.001.03", "pain.008.001.03"), - ("pain.008.001.04", "pain.008.001.04"), - ("pain.008.003.02", "pain.008.003.02 (direct debit in Germany)"), + ( + "pain.008.001.02", + "pain.008.001.02 (direct debit, old recommended version)", + ), + ( + "pain.008.001.08", + "pain.008.001.08 (direct debit, new recommended version)", + ), + ("pain.008.003.02", "pain.008.003.02 (direct debit for Germany only)"), ], ondelete={ "pain.008.001.02": "set null", - "pain.008.001.03": "set null", - "pain.008.001.04": "set null", + "pain.008.001.08": "set null", "pain.008.003.02": "set null", }, ) @@ -26,8 +30,7 @@ def _get_xsd_file_path(self): self.ensure_one() if self.pain_version in [ "pain.008.001.02", - "pain.008.001.03", - "pain.008.001.04", + "pain.008.001.08", "pain.008.003.02", ]: path = "account_banking_sepa_direct_debit/data/%s.xsd" % self.pain_version diff --git a/account_banking_sepa_direct_debit/models/account_payment_order.py b/account_banking_sepa_direct_debit/models/account_payment_order.py index 06b68455ccd9..d455e068a04a 100644 --- a/account_banking_sepa_direct_debit/models/account_payment_order.py +++ b/account_banking_sepa_direct_debit/models/account_payment_order.py @@ -23,7 +23,7 @@ def generate_payment_file(self): if pain_flavor.startswith(("pain.008.001.02", "pain.008.003.02")): bic_xml_tag = "BIC" name_maxsize = 70 - elif pain_flavor.startswith(("pain.008.001.03", "pain.008.001.04")): + elif pain_flavor.startswith("pain.008.001.08"): bic_xml_tag = "BICFI" name_maxsize = 140 else: diff --git a/account_banking_sepa_direct_debit/readme/DESCRIPTION.rst b/account_banking_sepa_direct_debit/readme/DESCRIPTION.rst index 438e66ebaf66..13c8a1090aaa 100644 --- a/account_banking_sepa_direct_debit/readme/DESCRIPTION.rst +++ b/account_banking_sepa_direct_debit/readme/DESCRIPTION.rst @@ -1,14 +1,11 @@ -Create SEPA files for Direct Debit +Module to export direct debit orders in SEPA XML file format. -Module to export direct debit payment orders in SEPA XML file format. +`ISO 20022 `_ is the new international standard for +bank XML files. This module implements SEPA Direct +Debit (SDD), more specifically ISO 20022 PAIN (PAyment INitiation) versions 008.001.02 and 008.001.08. +It follows the `SEPA direct debit implementation guidelines `_ of the `European Payments Council `_. -SEPA PAIN (PAyment INitiation) is the new european standard for -Customer-to-Bank payment instructions. This module implements SEPA Direct -Debit (SDD), more specifically PAIN versions 008.001.02, 008.001.03 and -008.001.04. It is part of the ISO 20022 standard, available on -http://www.iso20022.org. +This module also supports PAIN version 008.003.02 which is used in Germany. +You can read more about this in german on `ebics.de `_. -The Implementation Guidelines for SEPA Direct Debit published by the European -Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN -version 008.001.02. So if you don't know which version your bank supports, you -should try version 008.001.02 first. +It supports both SEPA **Core** and SEPA **B2B** mandates. diff --git a/account_banking_sepa_direct_debit/static/description/index.html b/account_banking_sepa_direct_debit/static/description/index.html index 13b4024ce887..aab94961696f 100644 --- a/account_banking_sepa_direct_debit/static/description/index.html +++ b/account_banking_sepa_direct_debit/static/description/index.html @@ -367,20 +367,17 @@

    Account Banking SEPA Direct Debit

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:54d15a19d5ebcc37a1989d4ee96f33222b9a531640efd5bd6b8874f90e787edc +!! source digest: sha256:6c106e86beb875867d6b9a7dfd431164b6b1a230e4d3ef53d533af13e3f68401 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

    Beta License: AGPL-3 OCA/bank-payment Translate me on Weblate Try me on Runboat

    -

    Create SEPA files for Direct Debit

    -

    Module to export direct debit payment orders in SEPA XML file format.

    -

    SEPA PAIN (PAyment INitiation) is the new european standard for -Customer-to-Bank payment instructions. This module implements SEPA Direct -Debit (SDD), more specifically PAIN versions 008.001.02, 008.001.03 and -008.001.04. It is part of the ISO 20022 standard, available on -http://www.iso20022.org.

    -

    The Implementation Guidelines for SEPA Direct Debit published by the European -Payments Council (http://http://www.europeanpaymentscouncil.eu) use PAIN -version 008.001.02. So if you don’t know which version your bank supports, you -should try version 008.001.02 first.

    +

    Module to export direct debit orders in SEPA XML file format.

    +

    ISO 20022 is the new international standard for +bank XML files. This module implements SEPA Direct +Debit (SDD), more specifically ISO 20022 PAIN (PAyment INitiation) versions 008.001.02 and 008.001.08. +It follows the SEPA direct debit implementation guidelines of the European Payments Council.

    +

    This module also supports PAIN version 008.003.02 which is used in Germany. +You can read more about this in german on ebics.de.

    +

    It supports both SEPA Core and SEPA B2B mandates.

    Table of contents

      diff --git a/account_banking_sepa_direct_debit/tests/test_sdd.py b/account_banking_sepa_direct_debit/tests/test_sdd.py index 2faa6c4ebcb4..3e11ebfefca1 100644 --- a/account_banking_sepa_direct_debit/tests/test_sdd.py +++ b/account_banking_sepa_direct_debit/tests/test_sdd.py @@ -342,18 +342,14 @@ def create_invoice(self, partner_id, mandate, price_unit, inv_type="out_invoice" class TestSDD(TestSDDBase): - def test_pain_001_02(self): + def test_pain_008_001_02(self): self.payment_mode.payment_method_id.pain_version = "pain.008.001.02" self.check_sdd() - def test_pain_003_02(self): - self.payment_mode.payment_method_id.pain_version = "pain.008.003.02" - self.check_sdd() - - def test_pain_001_03(self): - self.payment_mode.payment_method_id.pain_version = "pain.008.001.03" + def test_pain_0008_001_08(self): + self.payment_mode.payment_method_id.pain_version = "pain.008.001.08" self.check_sdd() - def test_pain_001_04(self): - self.payment_mode.payment_method_id.pain_version = "pain.008.001.04" + def test_pain_008_003_02(self): + self.payment_mode.payment_method_id.pain_version = "pain.008.003.02" self.check_sdd()