From 41df4fafce55a8dd50dd8780ffa2d8750bd8bdd0 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 18 Aug 2017 19:59:31 +0200 Subject: [PATCH] [IMP] account_banking*: Show identifiers at payment mode level Now the visibility is controlled through a security group. --- account_banking_pain_base/README.rst | 23 +++++++++++++++---- account_banking_pain_base/__manifest__.py | 10 ++++---- .../models/account_config_settings.py | 10 +++++++- .../security/security.xml | 10 ++++++++ .../views/account_config_settings.xml | 3 ++- .../views/account_payment_mode.xml | 7 +++--- 6 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 account_banking_pain_base/security/security.xml diff --git a/account_banking_pain_base/README.rst b/account_banking_pain_base/README.rst index 5e7f4774c..c81a1df7d 100644 --- a/account_banking_pain_base/README.rst +++ b/account_banking_pain_base/README.rst @@ -25,7 +25,18 @@ This module is part of the OCA/bank-payment suite. Configuration ============= -No configuration required. +#. Go to Accounting > Configuration > Settings. +#. On the fields "Initiating Party Issuer" and "Initiating Party Identifier", + in the section *SEPA/PAIN*, you can fill the corresponding identifiers. + +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 identifiers on the fields "Initiating Party Identifier" + and "Initiating Party Issuer". Usage ===== @@ -34,7 +45,7 @@ See 'readme' files of the OCA/bank-payment suite. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/173/9.0 + :target: https://runbot.odoo-community.org/runbot/173/10.0 Known issues / Roadmap ====================== @@ -70,10 +81,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_pain_base/__manifest__.py b/account_banking_pain_base/__manifest__.py index 173527f99..750b5808e 100644 --- a/account_banking_pain_base/__manifest__.py +++ b/account_banking_pain_base/__manifest__.py @@ -1,26 +1,26 @@ # -*- coding: utf-8 -*- -# © 2013-2016 Akretion - Alexis de Lattre -# © 2014 Tecnativa - Pedro M. Baeza -# © 2016 Tecnativa - Antonio Espinosa +# Copyright 2013-2016 Akretion - Alexis de Lattre +# 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 PAIN Base Module', 'summary': 'Base module for PAIN file generation', - 'version': '10.0.1.0.0', + 'version': '10.0.1.1.0', 'license': 'AGPL-3', 'author': "Akretion, " "Noviat, " "Tecnativa, " "Odoo Community Association (OCA)", 'website': 'https://github.com/OCA/bank-payment', - 'contributors': ['Pedro M. Baeza '], 'category': 'Hidden', 'depends': ['account_payment_order'], 'external_dependencies': { 'python': ['unidecode', 'lxml'], }, 'data': [ + 'security/security.xml', 'views/account_payment_line.xml', 'views/account_payment_order.xml', 'views/bank_payment_line_view.xml', diff --git a/account_banking_pain_base/models/account_config_settings.py b/account_banking_pain_base/models/account_config_settings.py index 0a7caba0f..ed8c17da3 100644 --- a/account_banking_pain_base/models/account_config_settings.py +++ b/account_banking_pain_base/models/account_config_settings.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- -# © 2016 Akretion - Alexis de Lattre +# Copyright 2016 Akretion - Alexis de Lattre +# Copyright 2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import models, fields @@ -12,3 +13,10 @@ class AccountConfigSettings(models.TransientModel): related='company_id.initiating_party_issuer') initiating_party_identifier = fields.Char( related='company_id.initiating_party_identifier') + group_pain_multiple_identifier = fields.Boolean( + string='Multiple identifiers', + implied_group='account_banking_pain_base.' + 'group_pain_multiple_identifier', + help="Enable this option if your country requires several SEPA/PAIN " + "identifiers like in Spain.", + ) diff --git a/account_banking_pain_base/security/security.xml b/account_banking_pain_base/security/security.xml new file mode 100644 index 000000000..4915015a1 --- /dev/null +++ b/account_banking_pain_base/security/security.xml @@ -0,0 +1,10 @@ + + + + + SEPA/PAIN Identifiers on Payment Modes + + + + + diff --git a/account_banking_pain_base/views/account_config_settings.xml b/account_banking_pain_base/views/account_config_settings.xml index 059b3e02e..9cdd2548e 100644 --- a/account_banking_pain_base/views/account_config_settings.xml +++ b/account_banking_pain_base/views/account_config_settings.xml @@ -12,9 +12,10 @@ - + + diff --git a/account_banking_pain_base/views/account_payment_mode.xml b/account_banking_pain_base/views/account_payment_mode.xml index 5cb2b4d02..67f796329 100644 --- a/account_banking_pain_base/views/account_payment_mode.xml +++ b/account_banking_pain_base/views/account_payment_mode.xml @@ -1,7 +1,7 @@ @@ -13,9 +13,8 @@ - - - + +