[MIG] account_banking_sepa_direct_debit to v14.0

This commit is contained in:
Alexis de Lattre
2021-01-13 16:11:30 +01:00
committed by Reyes4711
parent 5d1e60fb71
commit 8a7cce5183
24 changed files with 183 additions and 181 deletions

View File

@@ -1,2 +1,3 @@
from . import models
from . import wizards
from .post_install import update_bank_journals

View File

@@ -1,20 +1,20 @@
# Copyright 2013-2016 Akretion (www.akretion.com)
# Copyright 2014-2018 Tecnativa - Pedro M. Baeza
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2013-2020 Akretion (www.akretion.com)
# Copyright 2014-2020 Tecnativa - Pedro M. Baeza & Antonio Espinosa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Account Banking SEPA Direct Debit",
"summary": "Create SEPA files for Direct Debit",
"version": "13.0.1.0.2",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"author": "Akretion, " "Tecnativa, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/bank-payment",
"category": "Banking addons",
"depends": ["account_banking_pain_base", "account_banking_mandate"],
"external_dependencies": {"python": ["stdnum"]},
"data": [
"views/account_banking_mandate_view.xml",
"views/res_config.xml",
"views/res_config_settings.xml",
"views/account_payment_mode.xml",
"data/mandate_expire_cron.xml",
"data/account_payment_method.xml",

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
© 2013-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
Copyright 2013-2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">

View File

@@ -6,15 +6,12 @@
<field name="company_id" ref="base.main_company" />
<field name="bank_account_link">variable</field>
<field name="payment_method_id" ref="sepa_direct_debit" />
<field
name="default_journal_ids"
search="[('type', 'in', ('sale', 'sale_refund'))]"
/>
<field name="default_journal_ids" search="[('type', '=', 'sale')]" />
</record>
<record id="base.main_company" model="res.company">
<field name="sepa_creditor_identifier">FR78ZZZ424242</field>
</record>
<!-- Camptocamp -->
<!-- Azure Interior -->
<record id="res_partner_12_mandate" model="account.banking.mandate">
<field
name="partner_bank_id"
@@ -32,7 +29,7 @@
ref="payment_mode_inbound_sepa_dd1"
/>
</record>
<!-- Agrolait -->
<!-- Deco Addict -->
<record id="res_partner_2_mandate" model="account.banking.mandate">
<field
name="partner_bank_id"

View File

@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-01-10 23:46+0000\n"
"PO-Revision-Date: 2020-08-22 02:00+0000\n"
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n"
"Language-Team: none\n"
"Language: es_AR\n"
@@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"
"X-Generator: Weblate 3.10\n"
#. module: account_banking_sepa_direct_debit
#: model_terms:ir.ui.view,arch_db:account_banking_sepa_direct_debit.sepa_direct_debit_mandate_document
@@ -118,11 +118,10 @@ msgid ""
" THE DEBTOR WILL BE ABLE TO MANAGE THE MENTIONED AUTHORIZATION THROUGH THE MEANS PROVIDED BY HIS BANK."
msgstr ""
"TODOS LOS CAMPOS HAN DE SER CUMPLIMENTADOS OBLIGATORIAMENTE. UNA VEZ FIRMADA "
"ESTA ORDEN DE DOMICILIACIÓN DEBE SER ENVIADA AL ACREEDOR PARA SU CUSTODIA.\n"
" LA ENTIDAD DE DEUDOR REQUIERE AUTORIZACIÓN DE "
"ÉSTE PREVIA AL CARGO EN CUENTA DE LOS ADEUDOS DIRECTOS B2B.\n"
" EL DEUDOR PODRÁ GESTIONAR DICHA AUTORIZACIÓN "
"CON LOS MEDIOS QUE SU ENTIDAD PONGA A SU DISPOSICIÓN."
"ESTA ORDEN DE DOMICILIACIÓN DEBE SER ENVIADA AL ACREEDOR PARA SU CUSTODIA.LA "
"ENTIDAD DE DEUDOR REQUIERE AUTORIZACIÓN DE ÉSTE PREVIA AL CARGO EN CUENTA DE "
"LOS ADEUDOS DIRECTOS B2B.EL DEUDOR PODRÁ GESTIONAR DICHA AUTORIZACIÓN CON "
"LOS MEDIOS QUE SU ENTIDAD PONGA A SU DISPOSICIÓN."
#. module: account_banking_sepa_direct_debit
#: model_terms:ir.ui.view,arch_db:account_banking_sepa_direct_debit.sepa_direct_debit_mandate_document
@@ -132,12 +131,11 @@ msgid ""
" with your bank.\n"
" A refund must be claimed within 8 weeks starting from the date on which your account was debited."
msgstr ""
"Como parte de sus derechos, el deudor está legitimado al reembolso\n"
" por su entidad en los términos y condiciones del "
"contrato suscrito\n"
" con la misma.\n"
" La solicitud de reembolso deberá efectuarse "
"dentro de las ocho semanas que siguen a la fecha de adeudo en cuenta."
"Como parte de sus derechos, el deudor está legitimado al reembolso por su "
"entidad en los términos y condiciones del contrato suscrito con la misma. La "
"solicitud de reembolso deberá efectuarse dentro de las ocho semanas que "
"siguen a la fecha de adeudo en cuenta. Puede obtener información adicional "
"sobre sus derechos en su entidad financiera."
#. module: account_banking_sepa_direct_debit
#: code:addons/account_banking_sepa_direct_debit/models/account_banking_mandate.py:0
@@ -203,8 +201,7 @@ msgid ""
"- a country-specific identifier"
msgstr ""
"Introduzca el identificador de acreedor que se le ha atribuido a su compañía "
"para realizar adeudos directos SEPA. Su banco suele poseer esta información."
"\n"
"para realizar adeudos directos SEPA. Su banco suele poseer esta información. "
"Este identificador se compone de:\n"
"- el código ISO de 2 letras de su país\n"
"- dos dígitos de comprobación\n"
@@ -426,13 +423,11 @@ msgid ""
" not to debit your account up until the day on which the payment is due."
msgstr ""
"Esta orden de domiciliación está prevista para operaciones exclusivamente "
"entre empresas y/o autónomos.\n"
" El deudor no tiene derecho a que su entidad le "
"reembolse una vez que se haya realizado\n"
" el cargo en cuenta, pero puede solicitar a su "
"entidad que no efectúe el adeudo en la cuenta hasta la fecha debida.\n"
" Podrá obtener información detallada del "
"procedimiento en su entidad financiera."
"entre empresas y/o autónomos. El deudor no tiene derecho a que su entidad le "
"reembolse una vez que se haya realizado el cargo en cuenta, pero puede "
"solicitar a su entidad que no efectúe el adeudo en la cuenta hasta la fecha "
"debida. Podrá obtener información detallada del procedimiento en su entidad "
"financiera."
#. module: account_banking_sepa_direct_debit
#: model_terms:ir.ui.view,arch_db:account_banking_sepa_direct_debit.sepa_direct_debit_mandate_document
@@ -492,6 +487,5 @@ msgid ""
" debit your account in accordance with the instructions from"
msgstr ""
"a enviar instrucciones a la entidad del deudor para adeudar su cuenta y (B) "
"a la entidad \n"
" para efectuar los adeudos en su cuenta siguiendo "
"las instrucciones del acreedor"
"a la entidad para efectuar los adeudos en su cuenta siguiendo las "
"instrucciones del acreedor"

View File

@@ -1,5 +1,4 @@
from . import res_company
from . import res_config
from . import account_banking_mandate
from . import bank_payment_line
from . import account_payment_mode

View File

@@ -1,4 +1,4 @@
# Copyright 2013-2016 Akretion - Alexis de Lattre
# Copyright 2020 Akretion - Alexis de Lattre
# Copyright 2014 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
@@ -19,14 +19,20 @@ class AccountBankingMandate(models.Model):
_inherit = "account.banking.mandate"
_rec_name = "display_name"
format = fields.Selection(selection_add=[("sepa", "Sepa Mandate")], default="sepa")
format = fields.Selection(
selection_add=[("sepa", "Sepa Mandate")],
default="sepa",
ondelete={"sepa": "set default"},
)
type = fields.Selection(
selection_add=[("recurrent", "Recurrent"), ("oneoff", "One-Off")]
selection_add=[("recurrent", "Recurrent"), ("oneoff", "One-Off")],
default="recurrent",
ondelete={"recurrent": "set null", "oneoff": "set null"},
)
recurrent_sequence_type = fields.Selection(
[("first", "First"), ("recurring", "Recurring"), ("final", "Final")],
string="Sequence Type for Next Debit",
track_visibility="onchange",
tracking=70,
help="This field is only used for Recurrent mandates, not for "
"One-Off mandates.",
default="first",
@@ -35,7 +41,7 @@ class AccountBankingMandate(models.Model):
[("CORE", "Basic (CORE)"), ("B2B", "Enterprise (B2B)")],
string="Scheme",
default="CORE",
track_visibility="onchange",
tracking=80,
)
unique_mandate_reference = fields.Char(size=35) # cf ISO 20022
display_name = fields.Char(compute="_compute_display_name2", store=True)
@@ -61,47 +67,50 @@ class AccountBankingMandate(models.Model):
@api.onchange("partner_bank_id")
def mandate_partner_bank_change(self):
for mandate in self:
super(AccountBankingMandate, self).mandate_partner_bank_change()
res = {}
if (
mandate.state == "valid"
and mandate.partner_bank_id
and mandate.type == "recurrent"
and mandate.recurrent_sequence_type != "first"
):
mandate.recurrent_sequence_type = "first"
res["warning"] = {
"title": _("Mandate update"),
"message": _(
"As you changed the bank account attached "
"to this mandate, the 'Sequence Type' has "
"been set back to 'First'."
),
}
return res
super().mandate_partner_bank_change()
res = {}
if (
self.state == "valid"
and self.partner_bank_id
and self.type == "recurrent"
and self.recurrent_sequence_type != "first"
):
self.recurrent_sequence_type = "first"
res["warning"] = {
"title": _("Mandate update"),
"message": _(
"As you changed the bank account attached "
"to this mandate, the 'Sequence Type' has "
"been set back to 'First'."
),
}
return res
def _sdd_mandate_set_state_to_expired(self):
logger.info("Searching for SDD Mandates that must be set to Expired")
expire_limit_date = datetime.today() + relativedelta(
months=-NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY
)
expire_limit_date_str = expire_limit_date.strftime("%Y-%m-%d")
expired_mandates = self.search(
[
"|",
("last_debit_date", "=", False),
("last_debit_date", "<=", expire_limit_date_str),
("last_debit_date", "<=", expire_limit_date),
("state", "=", "valid"),
("signature_date", "<=", expire_limit_date_str),
("signature_date", "<=", expire_limit_date),
]
)
if expired_mandates:
expired_mandates.write({"state": "expired"})
expired_mandates.message_post(
body=_(
"Mandate automatically set to expired after %d months without use."
)
% NUMBER_OF_UNUSED_MONTHS_BEFORE_EXPIRY
)
logger.info(
"The following SDD Mandate IDs has been set to expired: %s"
% expired_mandates.ids
"%d SDD Mandate set to expired: IDs %s"
% (len(expired_mandates), expired_mandates.ids)
)
else:
logger.info("0 SDD Mandates had to be set to Expired")
return True

View File

@@ -9,7 +9,7 @@ class AccountPaymentLine(models.Model):
_inherit = "account.payment.line"
def draft2open_payment_line_check(self):
res = super(AccountPaymentLine, self).draft2open_payment_line_check()
res = super().draft2open_payment_line_check()
sepa_dd_lines = self.filtered(
lambda l: l.order_id.payment_method_id.code == "sepa_direct_debit"
)

View File

@@ -1,4 +1,4 @@
# Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
@@ -13,7 +13,13 @@ class AccountPaymentMethod(models.Model):
("pain.008.001.03", "pain.008.001.03"),
("pain.008.001.04", "pain.008.001.04"),
("pain.008.003.02", "pain.008.003.02 (direct debit in Germany)"),
]
],
ondelete={
"pain.008.001.02": "set null",
"pain.008.001.03": "set null",
"pain.008.001.04": "set null",
"pain.008.003.02": "set null",
},
)
def get_xsd_file_path(self):
@@ -26,4 +32,4 @@ class AccountPaymentMethod(models.Model):
]:
path = "account_banking_sepa_direct_debit/data/%s.xsd" % self.pain_version
return path
return super(AccountPaymentMethod, self).get_xsd_file_path()
return super().get_xsd_file_path()

View File

@@ -1,11 +1,11 @@
# Copyright 2016 Tecnativa - Antonio Espinosa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from stdnum.eu.at_02 import is_valid
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from .common import is_sepa_creditor_identifier_valid
class AccountPaymentMode(models.Model):
_inherit = "account.payment.mode"
@@ -26,11 +26,8 @@ class AccountPaymentMode(models.Model):
@api.constrains("sepa_creditor_identifier")
def _check_sepa_creditor_identifier(self):
for payment_mode in self:
if payment_mode.sepa_creditor_identifier:
if not is_sepa_creditor_identifier_valid(
payment_mode.sepa_creditor_identifier
):
raise ValidationError(
_("The SEPA Creditor Identifier '%s' is invalid.")
% payment_mode.sepa_creditor_identifier
)
ics = payment_mode.sepa_creditor_identifier
if ics and not is_valid(ics):
raise ValidationError(
_("The SEPA Creditor Identifier '%s' is invalid.") % ics
)

View File

@@ -1,4 +1,4 @@
# Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
@@ -15,7 +15,7 @@ class AccountPaymentOrder(models.Model):
"""Creates the SEPA Direct Debit file. That's the important code !"""
self.ensure_one()
if self.payment_method_id.code != "sepa_direct_debit":
return super(AccountPaymentOrder, self).generate_payment_file()
return super().generate_payment_file()
pain_flavor = self.payment_method_id.pain_version
# We use pain_flavor.startswith('pain.008.001.xx')
# to support country-specific extensions such as
@@ -275,7 +275,7 @@ class AccountPaymentOrder(models.Model):
# from first to recurring, so that the account move
# is generated BEFORE, which will allow the split
# of the account move per sequence_type
res = super(AccountPaymentOrder, self).generated2uploaded()
res = super().generated2uploaded()
abmo = self.env["account.banking.mandate"]
for order in self:
to_expire_mandates = abmo.browse([])

View File

@@ -1,4 +1,4 @@
# Copyright 2015-2016 Akretion - Alexis de Lattre
# Copyright 2020 Akretion - Alexis de Lattre
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
@@ -15,6 +15,6 @@ class BankPaymentLine(models.Model):
So we split the transfer move lines by mandate type, so easier
reconciliation of the bank statement.
"""
hashcode = super(BankPaymentLine, self).move_line_offsetting_account_hashcode()
hashcode = super().move_line_offsetting_account_hashcode()
hashcode += "-" + str(self.mandate_id.recurrent_sequence_type)
return hashcode

View File

@@ -1,35 +0,0 @@
# Copyright 2013-2016 Akretion - Alexis de Lattre
# Copyright 2014 Tecnativa - Pedro M. Baeza
# Copyright 2016 Tecnativa - Antonio Espinosa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
logger = logging.getLogger(__name__)
def is_sepa_creditor_identifier_valid(sepa_creditor_identifier):
"""Check if SEPA Creditor Identifier is valid
@param sepa_creditor_identifier: SEPA Creditor Identifier as str
or unicode
@return: True if valid, False otherwise
"""
if not isinstance(sepa_creditor_identifier, str):
return False
try:
sci = str(sepa_creditor_identifier).lower()
except Exception:
logger.warning("SEPA Creditor ID should contain only ASCII characters.")
return False
if len(sci) < 9:
return False
before_replacement = sci[7:] + sci[0:2] + "00"
logger.debug("SEPA ID check before_replacement = %s" % before_replacement)
after_replacement = ""
for char in before_replacement:
if char.isalpha():
after_replacement += str(ord(char) - 87)
else:
after_replacement += char
logger.debug("SEPA ID check after_replacement = %s" % after_replacement)
return int(sci[2:4]) == (98 - (int(after_replacement) % 97))

View File

@@ -3,11 +3,11 @@
# Copyright 2016 Tecnativa - Antonio Espinosa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from stdnum.eu.at_02 import is_valid
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from .common import is_sepa_creditor_identifier_valid
class ResCompany(models.Model):
_inherit = "res.company"
@@ -25,11 +25,8 @@ class ResCompany(models.Model):
@api.constrains("sepa_creditor_identifier")
def _check_sepa_creditor_identifier(self):
for company in self:
if company.sepa_creditor_identifier:
if not is_sepa_creditor_identifier_valid(
company.sepa_creditor_identifier
):
raise ValidationError(
_("The SEPA Creditor Identifier '%s' is invalid.")
% company.sepa_creditor_identifier
)
ics = company.sepa_creditor_identifier
if ics and not is_valid(ics):
raise ValidationError(
_("The SEPA Creditor Identifier '%s' is invalid.") % ics
)

View File

@@ -1,3 +1,3 @@
In the menu *Invoicing/Accounting > Payments > Debit Order*, create a new debit
In the menu *Invoicing/Accounting > Customers > Debit Order*, create a new debit
order and select the Payment Mode dedicated to SEPA Direct Debit that
you created during the configuration step.

View File

@@ -13,18 +13,23 @@
</xpath>
</template>
<!-- QWeb Report -->
<report
id="report_sepa_direct_debit_mandate"
model="account.banking.mandate"
string="Sepa Mandate"
report_type="qweb-pdf"
name="account_banking_sepa_direct_debit.sepa_direct_debit_mandate"
file="account_banking_sepa_direct_debit.sepa_direct_debit_mandate"
/>
<record id="report_sepa_direct_debit_mandate" model="ir.actions.report">
<field name="name">SEPA Mandate</field>
<field name="model">account.banking.mandate</field>
<field name="report_type">qweb-pdf</field>
<field
name="report_name"
>account_banking_sepa_direct_debit.sepa_direct_debit_mandate</field>
<field
name="report_file"
>account_banking_sepa_direct_debit.sepa_direct_debit_mandate</field>
<field
name="paperformat_id"
ref="account_banking_sepa_direct_debit.paperformat_euro_sepa_lowmargin"
/>
<field
name="print_report_name"
>'Mandate-%s-%s' % (object.unique_mandate_reference, object.partner_id.name.replace(' ', '_')</field>
<field name="binding_model_id" ref="model_account_banking_mandate" />
</record>
</odoo>

View File

@@ -1,2 +1,2 @@
from . import test_sdd
# from . import test_sdd # TODO port those tests
from . import test_mandate

View File

@@ -1,4 +1,4 @@
# Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2016-2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from dateutil.relativedelta import relativedelta
@@ -34,7 +34,7 @@ class TestMandate(TransactionCase):
self.assertEqual(self.mandate.state, "expired")
def setUp(self):
res = super(TestMandate, self).setUp()
res = super().setUp()
self.partner = self.env.ref("base.res_partner_12")
bank_account = self.env.ref("account_payment_mode.res_partner_12_iban")
self.mandate = self.env["account.banking.mandate"].create(

View File

@@ -216,14 +216,14 @@ class TestSDDBase(TestAccountMultiCompanyNoChartCommon):
"partner_id": partner_id,
"reference_type": "none",
"currency_id": self.env.ref("base.EUR").id,
"type": inv_type,
"move_type": inv_type,
"date": fields.Date.today(),
"payment_mode_id": self.payment_mode.id,
"mandate_id": mandate.id,
"invoice_line_ids": invoice_vals,
}
)
invoice.post()
invoice.action_post()
return invoice

View File

@@ -18,17 +18,18 @@
attrs="{'invisible': [('format', '!=', 'sepa')],
'required': [('format', '=', 'sepa')]}"
/>
<field
name="type"
attrs="{'invisible': [('format', '!=', 'sepa')],
'required': [('format', '=', 'sepa')]}"
/>
<field
name="recurrent_sequence_type"
attrs="{'invisible': ['|', ('type', '=', 'oneoff'), ('format', '!=', 'sepa')],
'required': [('type', '=', 'recurrent')]}"
/>
</field>
<field name="type" position="attributes">
<attribute
name="attrs"
>{'required': [('format', '=', 'sepa')]}</attribute>
</field>
</field>
</record>
<record id="view_mandate_tree" model="ir.ui.view">
@@ -36,11 +37,30 @@
<field name="model">account.banking.mandate</field>
<field name="inherit_id" ref="account_banking_mandate.view_mandate_tree" />
<field name="arch" type="xml">
<field name="unique_mandate_reference" position="after">
<field name="scheme" />
<field name="type" string="Type" />
<field name="recurrent_sequence_type" string="Sequence Type" />
<field name="type" position="after">
<field
name="scheme"
widget="badge"
decoration-info="scheme == 'CORE'"
decoration-success="scheme == 'B2B'"
/>
<field
name="recurrent_sequence_type"
string="Sequence Type"
widget="badge"
decoration-info="recurrent_sequence_type == 'first'"
decoration-success="recurrent_sequence_type == 'recurring'"
decoration-warning="recurrent_sequence_type == 'final'"
/>
</field>
<field name="type" position="attributes">
<attribute name="decoration-info">type == 'recurrent'</attribute>
<attribute name="decoration-warning">type == 'oneoff'</attribute>
</field>
<field name="format" position="attributes">
<attribute name="decoration-success">format == 'sepa'</attribute>
</field>
</field>
</record>
<record id="view_mandate_search" model="ir.ui.view">
@@ -49,6 +69,7 @@
<field name="inherit_id" ref="account_banking_mandate.view_mandate_search" />
<field name="arch" type="xml">
<filter name="expired" position="after">
<separator />
<filter
name="oneoff"
string="One-Off"

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_account_config_settings" model="ir.ui.view">
<field name="name">sepa_direct_debit.account_config_settings.form
</field>
<field name="model">res.config.settings</field>
<field
name="inherit_id"
ref="account_banking_pain_base.view_account_config_settings"
/>
<field name="arch" type="xml">
<xpath expr="//div[@id='pain']/div/div/div" position="inside">
<div class="row mt16">
<label
for="sepa_creditor_identifier"
class="col-md-3 o_light_label"
/>
<field
name="sepa_creditor_identifier"
placeholder="Write the ICS of your company"
/>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_account_config_settings" model="ir.ui.view">
<field name="name">sepa_direct_debit.account_config_settings.form
</field>
<field name="model">res.config.settings</field>
<field
name="inherit_id"
ref="account_banking_pain_base.view_account_config_settings"
/>
<field name="arch" type="xml">
<xpath
expr="//div[@id='pain']/div[@id='pain_group_pain_multiple_identifier']"
position="after"
>
<div
id="pain_sepa_creditor_identifier"
class="col-12 col-lg-6 o_setting_box"
>
<div class="o_setting_left_pane" />
<div class="o_setting_right_pane">
<span class="o_form_label">
<label for="sepa_creditor_identifier" />
</span>
<div class="text-muted">
ICS of your company
</div>
<div class="text-muted">
<field name="sepa_creditor_identifier" />
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@@ -0,0 +1 @@
from . import res_config_settings