mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[MIG] account_banking_pain_base: Migration to 17.0
This commit is contained in:
@@ -117,6 +117,16 @@ Contributors
|
||||
|
||||
- Manuel Regidor
|
||||
|
||||
- `Trobz <https://www.trobz.com>`__:
|
||||
|
||||
- Tris Doan <tridm@trobz.com>
|
||||
|
||||
Other credits
|
||||
-------------
|
||||
|
||||
The migration of this module from 16.0 to 17.0 was financially supported
|
||||
by Camptocamp
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{
|
||||
"name": "Account Banking PAIN Base Module",
|
||||
"summary": "Base module for PAIN file generation",
|
||||
"version": "16.0.1.1.0",
|
||||
"version": "17.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"author": "Akretion, Noviat, Tecnativa, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/bank-payment",
|
||||
|
||||
@@ -38,8 +38,6 @@ class AccountPaymentOrder(models.Model):
|
||||
("DEBT", "Borne by Debtor"),
|
||||
],
|
||||
default="SLEV",
|
||||
readonly=True,
|
||||
states={"draft": [("readonly", False)], "open": [("readonly", False)]},
|
||||
tracking=True,
|
||||
help="Following service level : transaction charges are to be "
|
||||
"applied following the rules agreed in the service level "
|
||||
@@ -52,8 +50,6 @@ class AccountPaymentOrder(models.Model):
|
||||
"debtor.",
|
||||
)
|
||||
batch_booking = fields.Boolean(
|
||||
readonly=True,
|
||||
states={"draft": [("readonly", False)], "open": [("readonly", False)]},
|
||||
tracking=True,
|
||||
help="If true, the bank statement will display only one debit "
|
||||
"line for all the wire transfers of the SEPA XML file ; if "
|
||||
@@ -64,7 +60,7 @@ class AccountPaymentOrder(models.Model):
|
||||
@api.model
|
||||
def _sepa_iban_prefix_list(self):
|
||||
# List of IBAN prefixes (not country codes !)
|
||||
# Source: https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2023-01/EPC409-09%20EPC%20List%20of%20SEPA%20Scheme%20Countries%20v4.0_0.pdf # noqa: B950
|
||||
# Source: https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2023-01/ EPC409-09%20EPC%20List%20of%20SEPA%20Scheme%20Countries%20v4.0_0.pdf # noqa: E501
|
||||
# Some countries use IBAN but are not part of the SEPA zone
|
||||
# example: Turkey, Madagascar, Tunisia, etc.
|
||||
return [
|
||||
@@ -230,7 +226,7 @@ class AccountPaymentOrder(models.Model):
|
||||
if not isinstance(value, str):
|
||||
raise UserError(
|
||||
_(
|
||||
"The type of the field '%(field)s' is %(value)s. It should be a string "
|
||||
"The type of the field '%(field)s' is %(value)s. It should be a string " # noqa: E501
|
||||
"or unicode.",
|
||||
field=field_name,
|
||||
value=type(value),
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
|
||||
from odoo import SUPERUSER_ID, api
|
||||
|
||||
|
||||
def set_default_initiating_party(cr, registry):
|
||||
env = api.Environment(cr, SUPERUSER_ID, {})
|
||||
def set_default_initiating_party(env):
|
||||
for company in env["res.company"].search([]):
|
||||
company._default_initiating_party()
|
||||
return
|
||||
|
||||
@@ -13,3 +13,5 @@
|
||||
- Carlos Roca
|
||||
- [Sygel](https://www.sygel.es):
|
||||
- Manuel Regidor
|
||||
- [Trobz](https://www.trobz.com):
|
||||
- Tris Doan \<<tridm@trobz.com>\>
|
||||
|
||||
2
account_banking_pain_base/readme/CREDITS.md
Normal file
2
account_banking_pain_base/readme/CREDITS.md
Normal file
@@ -0,0 +1,2 @@
|
||||
The migration of this module from 16.0 to 17.0 was financially supported
|
||||
by Camptocamp
|
||||
@@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
@@ -386,7 +385,8 @@ November 21st 2013 in Epiais les Louvres (France).</p>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-8">Maintainers</a></li>
|
||||
<li><a class="reference internal" href="#other-credits" id="toc-entry-8">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -464,10 +464,19 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<li>Manuel Regidor</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference external" href="https://www.trobz.com">Trobz</a>:<ul>
|
||||
<li>Tris Doan <<a class="reference external" href="mailto:tridm@trobz.com">tridm@trobz.com</a>></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#toc-entry-8">Other credits</a></h2>
|
||||
<p>The migration of this module from 16.0 to 17.0 was financially supported
|
||||
by Camptocamp</p>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
|
||||
@@ -11,14 +11,8 @@
|
||||
<field name="payment_type" position="after">
|
||||
<field name="pain_version" />
|
||||
|
||||
<field
|
||||
name="convert_to_ascii"
|
||||
attrs="{'invisible': [('pain_version', '=', False)]}"
|
||||
/>
|
||||
<field
|
||||
name="warn_not_sepa"
|
||||
attrs="{'invisible': [('pain_version', '=', False)]}"
|
||||
/>
|
||||
<field name="convert_to_ascii" invisible="not pain_version" />
|
||||
<field name="warn_not_sepa" invisible="not pain_version" />
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -13,23 +13,21 @@
|
||||
/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="company_partner_bank_id" position="after">
|
||||
<field
|
||||
name="sepa"
|
||||
attrs="{'invisible': [('sepa_payment_method', '=', False)]}"
|
||||
/>
|
||||
<field name="sepa" invisible="not sepa_payment_method" />
|
||||
<field name="sepa_payment_method" invisible="1" />
|
||||
<field name="show_warning_not_sepa" invisible="1" />
|
||||
<field name="batch_booking" />
|
||||
<field name="batch_booking" readonly="state not in ['draft','open']" />
|
||||
<field
|
||||
name="charge_bearer"
|
||||
attrs="{'invisible': [('sepa', '=', True)]}"
|
||||
invisible="sepa"
|
||||
readonly="state not in ['draft','open']"
|
||||
/>
|
||||
</field>
|
||||
<header position="after">
|
||||
<div
|
||||
class="alert alert-warning"
|
||||
role="alert"
|
||||
attrs="{'invisible': [('show_warning_not_sepa', '=', False)]}"
|
||||
invisible="not show_warning_not_sepa"
|
||||
>
|
||||
This payment order is <b
|
||||
>not SEPA</b>. If it is not intented, check that all payment lines are in € and that all bank accounts are valid IBANs with a country prefix in the <a
|
||||
|
||||
@@ -9,37 +9,18 @@
|
||||
<field name="model">res.config.settings</field>
|
||||
<field name="inherit_id" ref="account.res_config_settings_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='analytic']" position="after">
|
||||
<h2>SEPA/PAIN</h2>
|
||||
<div class="row mt16 o_settings_container" id="pain">
|
||||
<div class="col-xs-12 col-md-6 o_setting_box">
|
||||
<div class="o_setting_right_pane">
|
||||
<div class="content-group">
|
||||
<div class="row mt16">
|
||||
<label
|
||||
for="initiating_party_identifier"
|
||||
class="col-md-3 o_light_label"
|
||||
/>
|
||||
<field name="initiating_party_identifier" />
|
||||
</div>
|
||||
<div class="row mt16">
|
||||
<label
|
||||
for="initiating_party_issuer"
|
||||
class="col-md-3 o_light_label"
|
||||
/>
|
||||
<field name="initiating_party_issuer" />
|
||||
</div>
|
||||
<div class="row mt16">
|
||||
<label
|
||||
for="group_pain_multiple_identifier"
|
||||
class="col-md-3 o_light_label"
|
||||
/>
|
||||
<field name="group_pain_multiple_identifier" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<xpath expr="//block[@id='analytic']" position="after">
|
||||
<block title="SEPA/PAIN" id="pain">
|
||||
<setting>
|
||||
<field name="initiating_party_identifier" />
|
||||
</setting>
|
||||
<setting>
|
||||
<field name="initiating_party_issuer" />
|
||||
</setting>
|
||||
<setting>
|
||||
<field name="group_pain_multiple_identifier" />
|
||||
</setting>
|
||||
</block>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user