From 9b3176fda6951186969bcabfddb50986239d33c6 Mon Sep 17 00:00:00 2001 From: chrispi-ch Date: Thu, 22 Nov 2018 20:34:52 +0000 Subject: [PATCH 1/7] Added translation using Weblate (German) Currently translated at 100.0% (1 of 1 strings) Translation: l10n-switzerland-11.0/l10n-switzerland-11.0-l10n_ch_pain_credit_transfer Translate-URL: https://translation.odoo-community.org/projects/l10n-switzerland-11-0/l10n-switzerland-11-0-l10n_ch_pain_credit_transfer/de/ --- l10n_ch_pain_credit_transfer/i18n/de.po | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 l10n_ch_pain_credit_transfer/i18n/de.po diff --git a/l10n_ch_pain_credit_transfer/i18n/de.po b/l10n_ch_pain_credit_transfer/i18n/de.po new file mode 100644 index 0000000000..af2b265d41 --- /dev/null +++ b/l10n_ch_pain_credit_transfer/i18n/de.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ch_pain_credit_transfer +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2018-11-23 21:12+0000\n" +"Last-Translator: chrispi-ch \n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.2.2\n" + +#. module: l10n_ch_pain_credit_transfer +#: model:ir.model,name:l10n_ch_pain_credit_transfer.model_account_payment_method +msgid "Payment Methods" +msgstr "Zahlungsmethoden" From 9162ce4d5697a81faf497d4a2eb038bfff938f17 Mon Sep 17 00:00:00 2001 From: Alexandre Saunier Date: Fri, 8 Feb 2019 17:34:39 +0100 Subject: [PATCH 2/7] [MIG] l10n_ch_pain_credit_transfer: Migration to odoo 12 --- l10n_ch_pain_credit_transfer/README.rst | 72 ++- l10n_ch_pain_credit_transfer/__manifest__.py | 4 +- .../readme/CONFIGURE.rst | 3 + .../readme/CONTRIBUTORS.rst | 3 + .../readme/DESCRIPTION.rst | 3 + l10n_ch_pain_credit_transfer/readme/USAGE.rst | 5 + .../static/description/index.html | 438 ++++++++++++++++++ 7 files changed, 505 insertions(+), 23 deletions(-) create mode 100644 l10n_ch_pain_credit_transfer/readme/CONFIGURE.rst create mode 100644 l10n_ch_pain_credit_transfer/readme/CONTRIBUTORS.rst create mode 100644 l10n_ch_pain_credit_transfer/readme/DESCRIPTION.rst create mode 100644 l10n_ch_pain_credit_transfer/readme/USAGE.rst create mode 100644 l10n_ch_pain_credit_transfer/static/description/index.html diff --git a/l10n_ch_pain_credit_transfer/README.rst b/l10n_ch_pain_credit_transfer/README.rst index aa21f5571a..29d72bdf26 100644 --- a/l10n_ch_pain_credit_transfer/README.rst +++ b/l10n_ch_pain_credit_transfer/README.rst @@ -1,15 +1,39 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -======================================= -Switzerland - ISO 20022 credit transfer -======================================= +================================== +Switzerland - PAIN Credit Transfer +================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-switzerland/tree/12.0/l10n_ch_pain_credit_transfer + :alt: OCA/l10n-switzerland +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-switzerland-12-0/l10n-switzerland-12-0-l10n_ch_pain_credit_transfer + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/125/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| This module adds support for *pain.001.001.03.ch.02* which is used for ISO 20022 credit transfers in Switzerland (SEPA or not SEPA). It implements the guidelines for `ISO 20022 credit transfers `_ published by SIX Interbank Clearing. +**Table of contents** + +.. contents:: + :local: + Configuration ============= @@ -26,39 +50,45 @@ On the payment order, you will see a new computed boolean field named This module doesn't modify the standard usage of the modules *account_payment_order* and *account_banking_sepa_credit_transfer*. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/125/11.0 - Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Akretion +* Camptocamp + Contributors ------------- +~~~~~~~~~~~~ * Alexis de Lattre * Denis Leemann * Mykhailo Panarin -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/l10n-switzerland `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_ch_pain_credit_transfer/__manifest__.py b/l10n_ch_pain_credit_transfer/__manifest__.py index 67b7f54993..59071bc198 100644 --- a/l10n_ch_pain_credit_transfer/__manifest__.py +++ b/l10n_ch_pain_credit_transfer/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Switzerland - PAIN Credit Transfer", "summary": "Generate ISO 20022 credit transfert (SEPA and not SEPA)", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "category": "Finance", "author": "Akretion,Camptocamp,Odoo Community Association (OCA)", "license": "AGPL-3", @@ -14,5 +14,5 @@ "l10n_ch_base_bank", "account_banking_sepa_credit_transfer", ], - 'installable': False, + 'installable': True, } diff --git a/l10n_ch_pain_credit_transfer/readme/CONFIGURE.rst b/l10n_ch_pain_credit_transfer/readme/CONFIGURE.rst new file mode 100644 index 0000000000..a4e8413a89 --- /dev/null +++ b/l10n_ch_pain_credit_transfer/readme/CONFIGURE.rst @@ -0,0 +1,3 @@ +In the menu *Accounting > Configuration > Management > Payment Methods*, +select the payment method that has the code *sepa_credit_transfer* and +set the *PAIN Version* to *pain.001.001.03.ch.02 (credit transfer in Switzerland)*. diff --git a/l10n_ch_pain_credit_transfer/readme/CONTRIBUTORS.rst b/l10n_ch_pain_credit_transfer/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..4f35f64a5a --- /dev/null +++ b/l10n_ch_pain_credit_transfer/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Alexis de Lattre +* Denis Leemann +* Mykhailo Panarin diff --git a/l10n_ch_pain_credit_transfer/readme/DESCRIPTION.rst b/l10n_ch_pain_credit_transfer/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..954f87fbbd --- /dev/null +++ b/l10n_ch_pain_credit_transfer/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module adds support for *pain.001.001.03.ch.02* which is used for ISO 20022 credit transfers in Switzerland (SEPA or not SEPA). + +It implements the guidelines for `ISO 20022 credit transfers `_ published by SIX Interbank Clearing. diff --git a/l10n_ch_pain_credit_transfer/readme/USAGE.rst b/l10n_ch_pain_credit_transfer/readme/USAGE.rst new file mode 100644 index 0000000000..baa7a74120 --- /dev/null +++ b/l10n_ch_pain_credit_transfer/readme/USAGE.rst @@ -0,0 +1,5 @@ +On the payment order, you will see a new computed boolean field named +*ISR* which shows if the payment order is BVR or not. + +This module doesn't modify the standard usage of the modules +*account_payment_order* and *account_banking_sepa_credit_transfer*. diff --git a/l10n_ch_pain_credit_transfer/static/description/index.html b/l10n_ch_pain_credit_transfer/static/description/index.html new file mode 100644 index 0000000000..a290d83ad6 --- /dev/null +++ b/l10n_ch_pain_credit_transfer/static/description/index.html @@ -0,0 +1,438 @@ + + + + + + +Switzerland - PAIN Credit Transfer + + + +
+

Switzerland - PAIN Credit Transfer

+ + +

Beta License: AGPL-3 OCA/l10n-switzerland Translate me on Weblate Try me on Runbot

+

This module adds support for pain.001.001.03.ch.02 which is used for ISO 20022 credit transfers in Switzerland (SEPA or not SEPA).

+

It implements the guidelines for ISO 20022 credit transfers published by SIX Interbank Clearing.

+

Table of contents

+ +
+

Configuration

+

In the menu Accounting > Configuration > Management > Payment Methods, +select the payment method that has the code sepa_credit_transfer and +set the PAIN Version to pain.001.001.03.ch.02 (credit transfer in Switzerland).

+
+
+

Usage

+

On the payment order, you will see a new computed boolean field named +ISR which shows if the payment order is BVR or not.

+

This module doesn’t modify the standard usage of the modules +account_payment_order and account_banking_sepa_credit_transfer.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/l10n-switzerland project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + From 7ab81ff5cb42065c6096c9e73669caf4d415cea5 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 1 Dec 2017 16:02:16 +0100 Subject: [PATCH 3/7] Rename BVR and BVR/ESR to ISR in english and make it the base term --- l10n_ch_base_bank/i18n/fr.po | 41 ++++++++++++++++++++++++++++++------ l10n_ch_base_bank/i18n/it.po | 34 +++++++++++++++++++++++++----- 2 files changed, 64 insertions(+), 11 deletions(-) diff --git a/l10n_ch_base_bank/i18n/fr.po b/l10n_ch_base_bank/i18n/fr.po index 1ffd192fc3..a65e05c47c 100644 --- a/l10n_ch_base_bank/i18n/fr.po +++ b/l10n_ch_base_bank/i18n/fr.po @@ -19,6 +19,33 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:56 +#, python-format +msgid "ISR Reference" +msgstr "Référence BVR" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:99 +#, python-format +msgid "ISR Reference is required" +msgstr "La référence BVR est requise" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:80 +#, python-format +msgid "ISR Reference type needs a postal account number on the customer." +msgstr "" +"Le type de référence BVR nécessite un numéro de compte postal sur le client." + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:85 +#, python-format +msgid "ISR Reference type needs a postal account number on your company" +msgstr "" +"Le type de référence BVR nécessite un numéro de compte postal sur votre " +"compagnie." + #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_res_bank msgid "Bank" @@ -32,7 +59,7 @@ msgstr "Comptes bancaires" #. module: l10n_ch_base_bank #: model:ir.model.fields,field_description:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num msgid "Bank ISR adherent number" -msgstr "" +msgstr "Numéro d'adhérent BVR" #. module: l10n_ch_base_bank #: code:addons/l10n_ch_base_bank/models/bank.py:248 @@ -110,7 +137,7 @@ msgstr "Référence interne" #: code:addons/l10n_ch_base_bank/models/invoice.py:113 #, python-format msgid "Invalid ISR Number (wrong checksum)." -msgstr "" +msgstr "Numéro BVR invalide" #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_account_invoice @@ -143,14 +170,14 @@ msgstr "" #. module: l10n_ch_base_bank #: sql_constraint:res.partner.bank:0 -msgid "The ISR adherent number/ccp pair must be unique !" -msgstr "" +msgid "The ISR adherent number must be unique !" +msgstr "Le numéro d'adhérent BVR doit être unique" #. module: l10n_ch_base_bank #: model:ir.model.fields,help:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num msgid "" -"Your Bank adherent number to be printed in references of your ISR. This is " -"not a postal account number." +"Your Bank adherent number to be printed in references of your ISR. This " +"is not a postal account number." msgstr "" #. module: l10n_ch_base_bank @@ -160,3 +187,5 @@ msgid "" "Your bank ISR adherent number must contain only digits!\n" "Please check your company bank account." msgstr "" +"Votre numéro d'adhérent BVR de votre banque ne doit contenir que des chiffres!\n" +"Veuillez vérifier le compte bancaire de votre société" diff --git a/l10n_ch_base_bank/i18n/it.po b/l10n_ch_base_bank/i18n/it.po index b7396b92bb..cd8fecf371 100644 --- a/l10n_ch_base_bank/i18n/it.po +++ b/l10n_ch_base_bank/i18n/it.po @@ -19,6 +19,30 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:56 +#, python-format +msgid "ISR Reference" +msgstr "" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:99 +#, python-format +msgid "ISR Reference is required" +msgstr "" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:80 +#, python-format +msgid "ISR Reference type needs a postal account number on the customer." +msgstr "" + +#. module: l10n_ch_base_bank +#: code:addons/l10n_ch_base_bank/models/invoice.py:85 +#, python-format +msgid "ISR Reference type needs a postal account number on your company" +msgstr "" + #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_res_bank msgid "Bank" @@ -110,7 +134,7 @@ msgstr "Riferimento interno" #: code:addons/l10n_ch_base_bank/models/invoice.py:113 #, python-format msgid "Invalid ISR Number (wrong checksum)." -msgstr "" +msgstr "Numero PVR errato (checksum invalido)." #. module: l10n_ch_base_bank #: model:ir.model,name:l10n_ch_base_bank.model_account_invoice @@ -143,14 +167,14 @@ msgstr "" #. module: l10n_ch_base_bank #: sql_constraint:res.partner.bank:0 -msgid "The ISR adherent number/ccp pair must be unique !" -msgstr "" +msgid "The ISR adherent number must be unique !" +msgstr "Il numero di adesione PVR deve essere univoco" #. module: l10n_ch_base_bank #: model:ir.model.fields,help:l10n_ch_base_bank.field_res_partner_bank_isr_adherent_num msgid "" -"Your Bank adherent number to be printed in references of your ISR. This is " -"not a postal account number." +"Your Bank adherent number to be printed in references of your ISR. This " +"is not a postal account number." msgstr "" #. module: l10n_ch_base_bank From ef2316f5fdb08529233b38a4bffe4eaebd0463e3 Mon Sep 17 00:00:00 2001 From: chrispi-ch Date: Thu, 22 Nov 2018 20:40:30 +0000 Subject: [PATCH 4/7] Translated using Weblate (German) Currently translated at 100.0% (5 of 5 strings) Translation: l10n-switzerland-11.0/l10n-switzerland-11.0-l10n_ch_pain_base Translate-URL: https://translation.odoo-community.org/projects/l10n-switzerland-11-0/l10n-switzerland-11-0-l10n_ch_pain_base/de/ --- l10n_ch_pain_base/i18n/de.po | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/l10n_ch_pain_base/i18n/de.po b/l10n_ch_pain_base/i18n/de.po index 536320ad53..6160fb29a7 100644 --- a/l10n_ch_pain_base/i18n/de.po +++ b/l10n_ch_pain_base/i18n/de.po @@ -9,14 +9,15 @@ msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-19 00:40+0000\n" -"PO-Revision-Date: 2017-04-19 00:40+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"PO-Revision-Date: 2018-11-23 22:11+0000\n" +"Last-Translator: chrispi-ch \n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.2.2\n" #. module: l10n_ch_pain_base #: code:addons/l10n_ch_pain_base/models/account_payment_order.py:72 @@ -25,24 +26,26 @@ msgid "" "For pain.001.001.03.ch.02, for non-ISR payments, the BIC is required on the " "bank '%s' related to the bank account '%s'" msgstr "" +"Bei pain.001.001.03.ch.02 ist für Nicht-ESR-Zahlungen der BIC zur Bank '%s' " +"des Bankkontos '%s' erforderlich" #. module: l10n_ch_pain_base #: model:ir.model,name:l10n_ch_pain_base.model_account_move_line msgid "Journal Item" -msgstr "Journalbuchung" +msgstr "Journaleintrag" #. module: l10n_ch_pain_base #: model:ir.model,name:l10n_ch_pain_base.model_account_payment_line msgid "Payment Lines" -msgstr "" +msgstr "Zahlungszeilen" #. module: l10n_ch_pain_base #: model:ir.model,name:l10n_ch_pain_base.model_account_payment_order msgid "Payment Order" -msgstr "" +msgstr "Zahlungsauftrag" #. module: l10n_ch_pain_base #: code:addons/l10n_ch_pain_base/models/account_payment_order.py:90 #, python-format msgid "The field 'CCP/CP-Konto' is not set on the bank account '%s'." -msgstr "" +msgstr "Das Feld 'Postkonto' ist beim Bankkonto '%s' nicht gesetzt." From 2c408fce7912b40de8bc31f446a2c74539fa83ba Mon Sep 17 00:00:00 2001 From: Alexandre Saunier Date: Mon, 11 Feb 2019 16:13:23 +0100 Subject: [PATCH 5/7] [MIG] l10n_ch_pain_base: Migration to odoo 12 --- l10n_ch_pain_base/README.rst | 72 ++- l10n_ch_pain_base/__manifest__.py | 4 +- .../migrations/11.0.1.0.0/post-migration.py | 16 - l10n_ch_pain_base/models/account_move_line.py | 3 +- .../models/account_payment_line.py | 3 +- l10n_ch_pain_base/readme/CONTRIBUTORS.rst | 3 + l10n_ch_pain_base/readme/DESCRIPTION.rst | 4 + .../static/description/index.html | 426 ++++++++++++++++++ .../tests/test_ch_sct.py | 13 +- 9 files changed, 492 insertions(+), 52 deletions(-) delete mode 100644 l10n_ch_pain_base/migrations/11.0.1.0.0/post-migration.py create mode 100644 l10n_ch_pain_base/readme/CONTRIBUTORS.rst create mode 100644 l10n_ch_pain_base/readme/DESCRIPTION.rst create mode 100644 l10n_ch_pain_base/static/description/index.html diff --git a/l10n_ch_pain_base/README.rst b/l10n_ch_pain_base/README.rst index eac70b73f2..1775ec0261 100644 --- a/l10n_ch_pain_base/README.rst +++ b/l10n_ch_pain_base/README.rst @@ -1,53 +1,79 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -=================================== -Switzerland - ISO 20022 base module -=================================== +======================= +Switzerland - ISO 20022 +======================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--switzerland-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-switzerland/tree/12.0/l10n_ch_pain_base + :alt: OCA/l10n-switzerland +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-switzerland-12-0/l10n-switzerland-12-0-l10n_ch_pain_base + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/125/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| This module doesn't do anything by himself. It is the base module for 2 other modules: * the module *l10n_ch_pain_credit_transfer* which adds support for the file format *pain.001.001.03.ch.02* which is used for ISO 20022 credit transfers (SEPA or not SEPA), - * the module *l10n_ch_pain_direct_debit* which adds support for the file format *pain.008.001.02.ch.01* which is used for ISO 20022 direct debits. -Usage -===== +**Table of contents** -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/125/11.0 +.. contents:: + :local: Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Akretion +* Camptocamp + Contributors ------------- +~~~~~~~~~~~~ * Alexis de Lattre * Denis Leemann * Mykhailo Panarin -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/l10n-switzerland `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_ch_pain_base/__manifest__.py b/l10n_ch_pain_base/__manifest__.py index 2725c9589c..52ce92adf8 100644 --- a/l10n_ch_pain_base/__manifest__.py +++ b/l10n_ch_pain_base/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Switzerland - ISO 20022", "summary": "ISO 20022 base module for Switzerland", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "category": "Finance", "author": "Akretion,Camptocamp,Odoo Community Association (OCA)", "license": "AGPL-3", @@ -17,5 +17,5 @@ 'views/account_payment_line.xml', 'views/bank_payment_line.xml', ], - 'installable': False, + 'installable': True, } diff --git a/l10n_ch_pain_base/migrations/11.0.1.0.0/post-migration.py b/l10n_ch_pain_base/migrations/11.0.1.0.0/post-migration.py deleted file mode 100644 index 172aadeffb..0000000000 --- a/l10n_ch_pain_base/migrations/11.0.1.0.0/post-migration.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2018 Camptocamp -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openupgradelib import openupgrade - - -def reference_type_bvr_to_isr(cr): - """Change BVR to ISR in reference_type field""" - cr.execute(""" - UPDATE account_payment_line SET communication_type='isr' - WHERE communication_type = 'bvr'; - """) - - -@openupgrade.migrate() -def migrate(env, version): - reference_type_bvr_to_isr(env.cr) diff --git a/l10n_ch_pain_base/models/account_move_line.py b/l10n_ch_pain_base/models/account_move_line.py index bfed64a18e..3d824df833 100644 --- a/l10n_ch_pain_base/models/account_move_line.py +++ b/l10n_ch_pain_base/models/account_move_line.py @@ -9,8 +9,7 @@ class AccountMoveLine(models.Model): @api.multi def _prepare_payment_line_vals(self, payment_order): - vals = super(AccountMoveLine, self)._prepare_payment_line_vals( - payment_order) + vals = super()._prepare_payment_line_vals(payment_order) if self.invoice_id and self.invoice_id.reference_type == 'isr': vals['local_instrument'] = 'CH01' if vals['communication']: diff --git a/l10n_ch_pain_base/models/account_payment_line.py b/l10n_ch_pain_base/models/account_payment_line.py index a5c8a028ee..28cd4c063b 100644 --- a/l10n_ch_pain_base/models/account_payment_line.py +++ b/l10n_ch_pain_base/models/account_payment_line.py @@ -12,7 +12,6 @@ class AccountPaymentLine(models.Model): communication_type = fields.Selection(selection_add=[('isr', 'ISR')]) def invoice_reference_type2communication_type(self): - res = super(AccountPaymentLine, self).\ - invoice_reference_type2communication_type() + res = super().invoice_reference_type2communication_type() res['isr'] = 'isr' return res diff --git a/l10n_ch_pain_base/readme/CONTRIBUTORS.rst b/l10n_ch_pain_base/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..4f35f64a5a --- /dev/null +++ b/l10n_ch_pain_base/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Alexis de Lattre +* Denis Leemann +* Mykhailo Panarin diff --git a/l10n_ch_pain_base/readme/DESCRIPTION.rst b/l10n_ch_pain_base/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..be01b0c7cf --- /dev/null +++ b/l10n_ch_pain_base/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +This module doesn't do anything by himself. It is the base module for 2 other modules: + +* the module *l10n_ch_pain_credit_transfer* which adds support for the file format *pain.001.001.03.ch.02* which is used for ISO 20022 credit transfers (SEPA or not SEPA), +* the module *l10n_ch_pain_direct_debit* which adds support for the file format *pain.008.001.02.ch.01* which is used for ISO 20022 direct debits. diff --git a/l10n_ch_pain_base/static/description/index.html b/l10n_ch_pain_base/static/description/index.html new file mode 100644 index 0000000000..b95e569f9f --- /dev/null +++ b/l10n_ch_pain_base/static/description/index.html @@ -0,0 +1,426 @@ + + + + + + +Switzerland - ISO 20022 + + + +
+

Switzerland - ISO 20022

+ + +

Beta License: AGPL-3 OCA/l10n-switzerland Translate me on Weblate Try me on Runbot

+

This module doesn’t do anything by himself. It is the base module for 2 other modules:

+
    +
  • the module l10n_ch_pain_credit_transfer which adds support for the file format pain.001.001.03.ch.02 which is used for ISO 20022 credit transfers (SEPA or not SEPA),
  • +
  • the module l10n_ch_pain_direct_debit which adds support for the file format pain.008.001.02.ch.01 which is used for ISO 20022 direct debits.
  • +
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/l10n-switzerland project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/l10n_ch_pain_credit_transfer/tests/test_ch_sct.py b/l10n_ch_pain_credit_transfer/tests/test_ch_sct.py index d2559e518c..6bb1b285be 100644 --- a/l10n_ch_pain_credit_transfer/tests/test_ch_sct.py +++ b/l10n_ch_pain_credit_transfer/tests/test_ch_sct.py @@ -72,7 +72,6 @@ def setUp(self): 'pain.001.001.03.ch.02' self.chf_currency = self.env.ref('base.CHF') self.eur_currency = self.env.ref('base.EUR') - self.main_company.currency_id = self.chf_currency.id ch_bank2 = self.env['res.bank'].create({ 'name': 'Banque Cantonale Vaudoise', 'bic': 'BCVLCH2LXXX', @@ -90,11 +89,11 @@ def setUp(self): def test_sct_ch_payment_type1(self): invoice1 = self.create_invoice( self.partner_agrolait.id, - self.agrolait_partner_bank.id, self.chf_currency, 42.0, + self.agrolait_partner_bank.id, self.eur_currency, 42.0, 'isr', '132000000000000000000000014') invoice2 = self.create_invoice( self.partner_agrolait.id, - self.agrolait_partner_bank.id, self.chf_currency, 12.0, + self.agrolait_partner_bank.id, self.eur_currency, 12.0, 'isr', '132000000000004') for inv in [invoice1, invoice2]: action = inv.create_account_payment_line() @@ -112,7 +111,7 @@ def test_sct_ch_payment_type1(self): self.assertEquals(len(pay_lines), 2) agrolait_pay_line1 = pay_lines[0] accpre = self.env['decimal.precision'].precision_get('Account') - self.assertEquals(agrolait_pay_line1.currency_id, self.chf_currency) + self.assertEquals(agrolait_pay_line1.currency_id, self.eur_currency) self.assertEquals( agrolait_pay_line1.partner_bank_id, invoice1.partner_bank_id) self.assertEquals(float_compare( @@ -129,7 +128,7 @@ def test_sct_ch_payment_type1(self): ('partner_id', '=', self.partner_agrolait.id)]) self.assertEquals(len(bank_lines), 2) for bank_line in bank_lines: - self.assertEquals(bank_line.currency_id, self.chf_currency) + self.assertEquals(bank_line.currency_id, self.eur_currency) self.assertEquals(bank_line.communication_type, 'isr') self.assertEquals( bank_line.communication in [ @@ -272,6 +271,7 @@ def create_invoice( 'payment_mode_id': self.payment_mode.id, 'partner_bank_id': partner_bank_id, }) + self.invoice_line_model.create({ 'invoice_id': invoice.id, 'price_unit': price_unit, @@ -279,6 +279,5 @@ def create_invoice( 'name': 'Great service', 'account_id': self.account_expense.id, }) - invoice.invoice_validate() - invoice.action_move_create() + invoice.action_invoice_open() return invoice From 9533ad23e6a20c3e35a7198828edb3b0472aea39 Mon Sep 17 00:00:00 2001 From: Iryna Vyshnevska Date: Fri, 19 Apr 2019 11:39:10 +0300 Subject: [PATCH 6/7] [FIX] update l10n_ch_base_bank to respect SEPA logic --- l10n_ch_base_bank/tests/test_bank.py | 7 ++++--- l10n_ch_base_bank/tests/test_create_invoice.py | 2 +- l10n_ch_base_bank/tests/test_search_invoice.py | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/l10n_ch_base_bank/tests/test_bank.py b/l10n_ch_base_bank/tests/test_bank.py index 7dc8aeaf72..57d959c76f 100644 --- a/l10n_ch_base_bank/tests/test_bank.py +++ b/l10n_ch_base_bank/tests/test_bank.py @@ -5,12 +5,13 @@ from odoo.tools import mute_logger from odoo import exceptions from odoo.tests.common import Form +from odoo.tests import tagged ch_iban = 'CH15 3881 5158 3845 3843 7' ch_post_iban = 'CH09 0900 0000 1000 8060 7' fr_iban = 'FR83 8723 4133 8709 9079 4002 530' - +@tagged('post_install','-at_install') class TestBank(common.SavepointCase): @classmethod @@ -251,8 +252,8 @@ def test_onchange_post_bank_ccp_in_acc_number(self): self.assertEqual(bank_acc.acc_number, '46-110-7') def test_name_search(self): - self.bank.bic = 'BIC12345' - result = self.env['res.bank'].name_search('BIC12345') + self.bank.bic = 'BBRUBEBB' + result = self.env['res.bank'].name_search('BBRUBEBB') self.assertEqual(result and result[0][0], self.bank.id) self.bank.code = 'CODE123' result = self.env['res.bank'].name_search('CODE123') diff --git a/l10n_ch_base_bank/tests/test_create_invoice.py b/l10n_ch_base_bank/tests/test_create_invoice.py index 0fb3a0d555..76a881ebce 100644 --- a/l10n_ch_base_bank/tests/test_create_invoice.py +++ b/l10n_ch_base_bank/tests/test_create_invoice.py @@ -15,7 +15,7 @@ def setUpClass(cls): cls.partner = cls.env.ref('base.res_partner_12') bank = cls.env['res.bank'].create({ 'name': 'BCV', - 'bic': 'BIC23423', + 'bic': 'BBRUBEBB', 'clearing': '234234', }) # define company bank account diff --git a/l10n_ch_base_bank/tests/test_search_invoice.py b/l10n_ch_base_bank/tests/test_search_invoice.py index 3375d8a0fb..3b1948fc7a 100644 --- a/l10n_ch_base_bank/tests/test_search_invoice.py +++ b/l10n_ch_base_bank/tests/test_search_invoice.py @@ -3,8 +3,9 @@ from odoo.tests import common from odoo.tests.common import Form +from odoo.tests import tagged - +@tagged('post_install','-at_install') class TestSearchInvoice(common.SavepointCase): @classmethod @@ -14,7 +15,7 @@ def setUpClass(cls): cls.company = cls.env.ref('base.main_company') bank = cls.env['res.bank'].create({ 'name': 'BCV', - 'bic': 'BIC23423', + 'bic': 'BBRUBEBB', 'clearing': '234234', 'ccp': '01-1234-1', }) From 5bff8e865b72584ecba697892ce6b4f8dabf18ab Mon Sep 17 00:00:00 2001 From: Iryna Vushnevska Date: Fri, 19 Apr 2019 22:19:35 +0300 Subject: [PATCH 7/7] fixup! [FIX] update l10n_ch_base_bank to respect SEPA logic --- l10n_ch_base_bank/tests/test_bank.py | 7 ++++--- l10n_ch_base_bank/tests/test_search_invoice.py | 3 ++- l10n_ch_payment_slip/tests/test_payment_slip.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/l10n_ch_base_bank/tests/test_bank.py b/l10n_ch_base_bank/tests/test_bank.py index 57d959c76f..bde211d147 100644 --- a/l10n_ch_base_bank/tests/test_bank.py +++ b/l10n_ch_base_bank/tests/test_bank.py @@ -11,7 +11,8 @@ ch_post_iban = 'CH09 0900 0000 1000 8060 7' fr_iban = 'FR83 8723 4133 8709 9079 4002 530' -@tagged('post_install','-at_install') + +@tagged('post_install', '-at_install') class TestBank(common.SavepointCase): @classmethod @@ -252,8 +253,8 @@ def test_onchange_post_bank_ccp_in_acc_number(self): self.assertEqual(bank_acc.acc_number, '46-110-7') def test_name_search(self): - self.bank.bic = 'BBRUBEBB' - result = self.env['res.bank'].name_search('BBRUBEBB') + self.bank.bic = 'BBAVBEBB' + result = self.env['res.bank'].name_search('BBAVBEBB') self.assertEqual(result and result[0][0], self.bank.id) self.bank.code = 'CODE123' result = self.env['res.bank'].name_search('CODE123') diff --git a/l10n_ch_base_bank/tests/test_search_invoice.py b/l10n_ch_base_bank/tests/test_search_invoice.py index 3b1948fc7a..5c41245bb5 100644 --- a/l10n_ch_base_bank/tests/test_search_invoice.py +++ b/l10n_ch_base_bank/tests/test_search_invoice.py @@ -5,7 +5,8 @@ from odoo.tests.common import Form from odoo.tests import tagged -@tagged('post_install','-at_install') + +@tagged('post_install', '-at_install') class TestSearchInvoice(common.SavepointCase): @classmethod diff --git a/l10n_ch_payment_slip/tests/test_payment_slip.py b/l10n_ch_payment_slip/tests/test_payment_slip.py index 39ad454ffa..b7902b044a 100644 --- a/l10n_ch_payment_slip/tests/test_payment_slip.py +++ b/l10n_ch_payment_slip/tests/test_payment_slip.py @@ -28,7 +28,7 @@ def make_bank(self): { 'name': 'BCV', 'ccp': '01-1234-1', - 'bic': '23452345', + 'bic': 'BBRUBEBB', 'clearing': '234234', } )