account_banking*: Show identifiers at payment mode level

Now the visibility is controlled through a security group.
This commit is contained in:
Pedro M. Baeza
2017-08-18 19:59:31 +02:00
committed by Enric Tobella
parent b90f8cc3e7
commit 5d312aa87c
4 changed files with 38 additions and 24 deletions

View File

@@ -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.

View File

@@ -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, "

View File

@@ -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):

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2015 Antiun Ingenieria S.L. - Antonio Espinosa
© 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
<!-- Copyright 2015-2017 Tecnativa
Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo>
@@ -11,10 +11,7 @@
<field name="inherit_id" ref="account_banking_pain_base.account_payment_mode_form"/>
<field name="arch" type="xml">
<group name="main" position="inside">
<field name="sepa_creditor_identifier" invisible="1"/>
<!-- This field should be set visible by localization modules
for countries that may have several sepa_creditor_identifier for
the same company (I guess only Spain) -->
<field name="sepa_creditor_identifier" groups="account_banking_pain_base.group_pain_multiple_identifier"/>
</group>
</field>
</record>