From 10b527e09b5ac1c9ed2e69a3929f1e5ccc5b771b Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 18 Aug 2017 19:59:31 +0200 Subject: [PATCH] account_banking*: Show identifiers at payment mode level Now the visibility is controlled through a security group. --- account_banking_sepa_direct_debit/README.rst | 38 +++++++++++++++---- .../__manifest__.py | 8 ++-- .../models/account_payment_mode.py | 7 ---- .../views/account_payment_mode.xml | 9 ++--- 4 files changed, 38 insertions(+), 24 deletions(-) diff --git a/account_banking_sepa_direct_debit/README.rst b/account_banking_sepa_direct_debit/README.rst index 2f3e89b17..cfbba11be 100644 --- a/account_banking_sepa_direct_debit/README.rst +++ b/account_banking_sepa_direct_debit/README.rst @@ -33,10 +33,32 @@ This module is part of the OCA/bank-payment suite. Configuration ============= -Create a Payment Mode dedicated to SEPA Direct Debit and select the -Payment Method *SEPA Direct Debit for customers* (which is automatically -created upon module installation) and check that this payment method -uses the proper version of PAIN. +For setting the SEPA creditor identifier: + +#. Go to Accounting > Configuration > Settings. +#. On the field "SEPA Creditor Identifier" in the section *SEPA/PAIN*, you can + fill the corresponding identifier. + +If your country requires several identifiers (like Spain), you must: + +#. Go to *Accounting > Configuration > Settings*. +#. On the section *SEPA/PAIN*, check the mark "Multiple identifiers". +#. Now go to *Accounting > Configuration > Management > Payment Modes*. +#. Create a payment mode for your specific bank. +#. Fill the specific identifier on the field "SEPA Creditor Identifier". + +For defining a payment mode that uses SEPA direct debit: + +#. Go to *Accounting > Configuration > Management > Payment Modes*. +#. Create a record. +#. Select the Payment Method *SEPA Direct Debit for customers* (which is + automatically created upon module installation). +#. Check that this payment method uses the proper version of PAIN. +#. If not, go *Accounting > Configuration > Management > Payment Methods*. +#. Locate the "SEPA Direct Debit for customers" record and open it. +#. Change the "PAIN version" according your needs. +#. If you need to handle several PAIN versions, just duplicate the payment + method adjusting this field on each for having them. Usage ===== @@ -83,10 +105,12 @@ Maintainer .. image:: http://odoo-community.org/logo.png :alt: Odoo Community Association - :target: http://odoo-community.org + :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. +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 http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/account_banking_sepa_direct_debit/__manifest__.py b/account_banking_sepa_direct_debit/__manifest__.py index 53191e3db..691592b72 100644 --- a/account_banking_sepa_direct_debit/__manifest__.py +++ b/account_banking_sepa_direct_debit/__manifest__.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -# © 2013-2016 Akretion (www.akretion.com) -# © 2014 Tecnativa - Pedro M. Baeza -# © 2016 Tecnativa - Antonio Espinosa +# Copyright 2013-2016 Akretion (www.akretion.com) +# Copyright 2014-2017 Tecnativa - Pedro M. Baeza +# Copyright 2016 Tecnativa - Antonio Espinosa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Account Banking SEPA Direct Debit', 'summary': 'Create SEPA files for Direct Debit', - 'version': '10.0.1.0.0', + 'version': '10.0.1.1.0', 'license': 'AGPL-3', 'author': "Akretion, " "Tecnativa, " diff --git a/account_banking_sepa_direct_debit/models/account_payment_mode.py b/account_banking_sepa_direct_debit/models/account_payment_mode.py index 2e13b9a39..3ef061eab 100644 --- a/account_banking_sepa_direct_debit/models/account_payment_mode.py +++ b/account_banking_sepa_direct_debit/models/account_payment_mode.py @@ -21,13 +21,6 @@ class AccountPaymentMode(models.Model): "- a 3-letters business code\n" "- a country-specific identifier") - def _sepa_type_get(self): - res = super(AccountPaymentMode, self)._sepa_type_get() - if not res: - if self.type.code and self.type.code.startswith('pain.008'): - res = 'sepa_direct_debit' - return res - @api.multi @api.constrains('sepa_creditor_identifier') def _check_sepa_creditor_identifier(self): diff --git a/account_banking_sepa_direct_debit/views/account_payment_mode.xml b/account_banking_sepa_direct_debit/views/account_payment_mode.xml index b7b8faebb..ac1301083 100644 --- a/account_banking_sepa_direct_debit/views/account_payment_mode.xml +++ b/account_banking_sepa_direct_debit/views/account_payment_mode.xml @@ -1,6 +1,6 @@ - @@ -11,10 +11,7 @@ - - +