From f18bfc2fab43a78050bfb564f8be945b21e895c4 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 10 Jul 2020 14:09:34 +0200 Subject: [PATCH] [FIX] account_banking_sepa_direct_debit: Remove l10n_generic_coa need on tests Tests assume that `l10n_generic_coa` is installed, which is not the case for several cases. We replace it creating a minimal account base data for the company test that makes it to work. --- .../README.rst | 16 +++-- .../account_banking_sepa_credit_transfer.pot | 48 +++++---------- .../static/description/index.html | 14 ++++- .../tests/test_sct.py | 61 +++++++++++-------- 4 files changed, 73 insertions(+), 66 deletions(-) diff --git a/account_banking_sepa_credit_transfer/README.rst b/account_banking_sepa_credit_transfer/README.rst index ed0a54b72..cefca0f37 100644 --- a/account_banking_sepa_credit_transfer/README.rst +++ b/account_banking_sepa_credit_transfer/README.rst @@ -14,13 +14,13 @@ Account Banking SEPA Credit Transfer :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbank--payment-lightgray.png?logo=github - :target: https://github.com/OCA/bank-payment/tree/12.0/account_banking_sepa_credit_transfer + :target: https://github.com/OCA/bank-payment/tree/13.0/account_banking_sepa_credit_transfer :alt: OCA/bank-payment .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/bank-payment-12-0/bank-payment-12-0-account_banking_sepa_credit_transfer + :target: https://translation.odoo-community.org/projects/bank-payment-13-0/bank-payment-13-0-account_banking_sepa_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/173/12.0 + :target: https://runbot.odoo-community.org/runbot/173/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -78,7 +78,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -106,6 +106,12 @@ Contributors * Antonio Espinosa * Pedro M. Baeza +* `DynApps NV `_: + + * Axel Priem +* `Sygel Technology `_: + + * Valentin Vinagre Maintainers ~~~~~~~~~~~ @@ -120,6 +126,6 @@ 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/bank-payment `_ project on GitHub. +This module is part of the `OCA/bank-payment `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot b/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot index a094ac16f..4fc4b07a7 100644 --- a/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot +++ b/account_banking_sepa_credit_transfer/i18n/account_banking_sepa_credit_transfer.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_banking_sepa_credit_transfer +# * account_banking_sepa_credit_transfer # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,13 +14,15 @@ msgstr "" "Plural-Forms: \n" #. module: account_banking_sepa_credit_transfer -#: code:addons/account_banking_sepa_credit_transfer/models/account_payment_order.py:155 +#: code:addons/account_banking_sepa_credit_transfer/models/account_payment_order.py:0 #, python-format -msgid "Bank account is missing on the bank payment line of partner '%s' (reference '%s')." +msgid "" +"Bank account is missing on the bank payment line of partner '%s' (reference " +"'%s')." msgstr "" #. module: account_banking_sepa_credit_transfer -#: selection:account.payment.line,local_instrument:0 +#: model:ir.model.fields.selection,name:account_banking_sepa_credit_transfer.selection__account_payment_line__local_instrument__inst msgid "Instant Transfer" msgstr "" @@ -35,8 +37,8 @@ msgid "PAIN Version" msgstr "" #. module: account_banking_sepa_credit_transfer -#: code:addons/account_banking_sepa_credit_transfer/models/account_payment_order.py:26 -#: code:addons/account_banking_sepa_credit_transfer/models/account_payment_order.py:60 +#: code:addons/account_banking_sepa_credit_transfer/models/account_payment_order.py:0 +#: code:addons/account_banking_sepa_credit_transfer/models/account_payment_order.py:0 #, python-format msgid "PAIN version '%s' is not supported." msgstr "" @@ -63,46 +65,26 @@ msgid "SEPA Credit Transfer to suppliers" msgstr "" #. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 +#: model:ir.model.fields.selection,name:account_banking_sepa_credit_transfer.selection__account_payment_method__pain_version__pain_001_001_02 msgid "pain.001.001.02" msgstr "" #. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 +#: model:ir.model.fields.selection,name:account_banking_sepa_credit_transfer.selection__account_payment_method__pain_version__pain_001_001_03 msgid "pain.001.001.03 (recommended for credit transfer)" msgstr "" #. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 +#: model:ir.model.fields.selection,name:account_banking_sepa_credit_transfer.selection__account_payment_method__pain_version__pain_001_001_04 msgid "pain.001.001.04" msgstr "" #. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 +#: model:ir.model.fields.selection,name:account_banking_sepa_credit_transfer.selection__account_payment_method__pain_version__pain_001_001_05 msgid "pain.001.001.05" msgstr "" #. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 +#: model:ir.model.fields.selection,name:account_banking_sepa_credit_transfer.selection__account_payment_method__pain_version__pain_001_003_03 msgid "pain.001.003.03 (credit transfer in Germany)" msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 -msgid "pain.008.001.02 (recommended for direct debit)" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 -msgid "pain.008.001.03" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 -msgid "pain.008.001.04" -msgstr "" - -#. module: account_banking_sepa_credit_transfer -#: selection:account.payment.method,pain_version:0 -msgid "pain.008.003.02 (direct debit in Germany)" -msgstr "" diff --git a/account_banking_sepa_credit_transfer/static/description/index.html b/account_banking_sepa_credit_transfer/static/description/index.html index 277b7daab..25ee73515 100644 --- a/account_banking_sepa_credit_transfer/static/description/index.html +++ b/account_banking_sepa_credit_transfer/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

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 @@ -422,7 +422,7 @@ Transfer that you created during the configuration step.

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.

+feedback.

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

@@ -450,6 +450,14 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Pedro M. Baeza
  • +
  • DynApps NV: +
  • +
  • Sygel Technology: +
  • @@ -459,7 +467,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    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/bank-payment project on GitHub.

    +

    This module is part of the OCA/bank-payment project on GitHub.

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

    diff --git a/account_banking_sepa_credit_transfer/tests/test_sct.py b/account_banking_sepa_credit_transfer/tests/test_sct.py index 4a82d917c..a457ca115 100644 --- a/account_banking_sepa_credit_transfer/tests/test_sct.py +++ b/account_banking_sepa_credit_transfer/tests/test_sct.py @@ -44,30 +44,41 @@ class TestSCT(SavepointCase): "company_id": cls.main_company.id, } ) - cls.env.ref( - "l10n_generic_coa.configurable_chart_template" - ).try_loading_for_current_company() - cls.account_expense = cls.account_model.search( - [ - ( - "user_type_id", - "=", - cls.env.ref("account.data_account_type_expenses").id, - ), - ("company_id", "=", cls.main_company.id), - ], - limit=1, + cls.account_expense = cls.account_model.create( + { + "user_type_id": cls.env.ref("account.data_account_type_expenses").id, + "name": "Test expense account", + "code": "TEA", + "company_id": cls.main_company.id, + } ) - cls.account_payable = cls.account_model.search( - [ - ( - "user_type_id", - "=", - cls.env.ref("account.data_account_type_payable").id, - ), - ("company_id", "=", cls.main_company.id), - ], - limit=1, + cls.account_payable = cls.account_model.create( + { + "user_type_id": cls.env.ref("account.data_account_type_payable").id, + "name": "Test payable account", + "code": "TTA", + "company_id": cls.main_company.id, + "reconcile": True, + } + ) + (cls.partner_asus + cls.partner_c2c + cls.partner_agrolait).with_context( + force_company=cls.main_company.id + ).write({"property_account_payable_id": cls.account_payable.id}) + cls.general_journal = cls.journal_model.create( + { + "name": "General journal", + "type": "general", + "code": "GEN", + "company_id": cls.main_company.id, + } + ) + cls.purchase_journal = cls.journal_model.create( + { + "name": "Purchase journal", + "type": "purchase", + "code": "PUR", + "company_id": cls.main_company.id, + } ) cls.partner_bank = cls.env.ref("account_payment_mode.main_company_iban").copy( { @@ -78,7 +89,6 @@ class TestSCT(SavepointCase): ), } ) - # create journal cls.bank_journal = cls.journal_model.create( { "name": "Company Bank journal", @@ -86,11 +96,12 @@ class TestSCT(SavepointCase): "code": "BNKFB", "bank_account_id": cls.partner_bank.id, "bank_id": cls.partner_bank.bank_id.id, + "company_id": cls.main_company.id, } ) # update payment mode cls.payment_mode = cls.env.ref( - "account_banking_sepa_credit_transfer." "payment_mode_outbound_sepa_ct1" + "account_banking_sepa_credit_transfer.payment_mode_outbound_sepa_ct1" ).copy({"company_id": cls.main_company.id}) cls.payment_mode.write( {"bank_account_link": "fixed", "fixed_journal_id": cls.bank_journal.id}