From d0edc5ae4691129be3889ab22b40788db563b2c6 Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 29 Mar 2022 13:03:00 +0200 Subject: [PATCH] [MIG]account_banking_pain_base: Migration to 15.0 --- account_banking_pain_base/__manifest__.py | 2 +- account_banking_pain_base/i18n/de.po | 2 +- account_banking_pain_base/i18n/es.po | 2 +- account_banking_pain_base/i18n/it.po | 2 +- account_banking_pain_base/i18n/nl.po | 2 +- account_banking_pain_base/i18n/pt_BR.po | 2 +- account_banking_pain_base/i18n/sl.po | 2 +- .../models/account_payment_line.py | 4 +--- .../models/account_payment_mode.py | 3 --- .../models/account_payment_order.py | 13 ++++++------- account_banking_pain_base/models/res_company.py | 3 --- account_banking_pain_base/readme/CONTRIBUTORS.rst | 3 +++ 12 files changed, 17 insertions(+), 23 deletions(-) diff --git a/account_banking_pain_base/__manifest__.py b/account_banking_pain_base/__manifest__.py index 4915322e4..1174941fa 100644 --- a/account_banking_pain_base/__manifest__.py +++ b/account_banking_pain_base/__manifest__.py @@ -7,7 +7,7 @@ { "name": "Account Banking PAIN Base Module", "summary": "Base module for PAIN file generation", - "version": "14.0.1.0.1", + "version": "15.0.1.0.1", "license": "AGPL-3", "author": "Akretion, Noviat, Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/bank-payment", diff --git a/account_banking_pain_base/i18n/de.po b/account_banking_pain_base/i18n/de.po index c08b953cb..cc3702e1a 100644 --- a/account_banking_pain_base/i18n/de.po +++ b/account_banking_pain_base/i18n/de.po @@ -676,7 +676,7 @@ msgstr "" #, fuzzy, python-format msgid "Payment Line has reference '%s'." msgstr "" -"Das '%s' der Zahlungszeile kann nicht mit der Referenz '%s'berechnet werden." +"Das 'Referenz '%s'berechnet werden." #. module: account_banking_pain_base #: model:ir.model,name:account_banking_pain_base.model_account_payment_line diff --git a/account_banking_pain_base/i18n/es.po b/account_banking_pain_base/i18n/es.po index 2bee95d26..a05b6b150 100644 --- a/account_banking_pain_base/i18n/es.po +++ b/account_banking_pain_base/i18n/es.po @@ -663,7 +663,7 @@ msgstr "" #, fuzzy, python-format msgid "Payment Line has reference '%s'." msgstr "" -"No se puede procesar el campo '%s' de la línea de pago con referencia '%s'." +"Línea de pago con referencia '%s'." #. module: account_banking_pain_base #: model:ir.model,name:account_banking_pain_base.model_account_payment_line diff --git a/account_banking_pain_base/i18n/it.po b/account_banking_pain_base/i18n/it.po index 6b2f58841..88c1bda35 100644 --- a/account_banking_pain_base/i18n/it.po +++ b/account_banking_pain_base/i18n/it.po @@ -682,7 +682,7 @@ msgstr "" #, fuzzy, python-format msgid "Payment Line has reference '%s'." msgstr "" -"Non è possibile calcolare '%s' della linea di pagamento con riferimento '%s'." +"Linea di pagamento con riferimento '%s'." #. module: account_banking_pain_base #: model:ir.model,name:account_banking_pain_base.model_account_payment_line diff --git a/account_banking_pain_base/i18n/nl.po b/account_banking_pain_base/i18n/nl.po index 5d6bbbba6..000793c93 100644 --- a/account_banking_pain_base/i18n/nl.po +++ b/account_banking_pain_base/i18n/nl.po @@ -665,7 +665,7 @@ msgstr "" #: code:addons/account_banking_pain_base/models/account_payment_order.py:0 #, fuzzy, python-format msgid "Payment Line has reference '%s'." -msgstr "Kan de '%s' niet berekenen van de betaalregel met referentie '%s'." +msgstr "Betaalregel met referentie '%s'." #. module: account_banking_pain_base #: model:ir.model,name:account_banking_pain_base.model_account_payment_line diff --git a/account_banking_pain_base/i18n/pt_BR.po b/account_banking_pain_base/i18n/pt_BR.po index 4ef75bb91..3d65163a3 100644 --- a/account_banking_pain_base/i18n/pt_BR.po +++ b/account_banking_pain_base/i18n/pt_BR.po @@ -645,7 +645,7 @@ msgstr "" #, fuzzy, python-format msgid "Payment Line has reference '%s'." msgstr "" -"Não foi possível calcular a '%s' da linha de pagamento com referência '%s'" +"Linha de pagamento com referência '%s'" #. module: account_banking_pain_base #: model:ir.model,name:account_banking_pain_base.model_account_payment_line diff --git a/account_banking_pain_base/i18n/sl.po b/account_banking_pain_base/i18n/sl.po index e3b0500ba..a7ed52512 100644 --- a/account_banking_pain_base/i18n/sl.po +++ b/account_banking_pain_base/i18n/sl.po @@ -647,7 +647,7 @@ msgstr "" #: code:addons/account_banking_pain_base/models/account_payment_order.py:0 #, fuzzy, python-format msgid "Payment Line has reference '%s'." -msgstr "Ne morem izračunati '%s' plačilne postavke s sklicem '%s'." +msgstr "Plačilne postavke s sklicem '%s'." #. module: account_banking_pain_base #: model:ir.model,name:account_banking_pain_base.model_account_payment_line diff --git a/account_banking_pain_base/models/account_payment_line.py b/account_banking_pain_base/models/account_payment_line.py index e62dc92b4..8753b263d 100644 --- a/account_banking_pain_base/models/account_payment_line.py +++ b/account_banking_pain_base/models/account_payment_line.py @@ -11,7 +11,6 @@ class AccountPaymentLine(models.Model): priority = fields.Selection( [("NORM", "Normal"), ("HIGH", "High")], - string="Priority", default="NORM", help="This field will be used as 'Instruction Priority' in " "the generated PAIN file.", @@ -20,7 +19,7 @@ class AccountPaymentLine(models.Model): # will begin on November 2017, cf account_banking_sepa_credit_transfer # It is also used in some countries such as switzerland, # cf l10n_ch_pain_base that adds some entries in the selection field - local_instrument = fields.Selection([], string="Local Instrument") + local_instrument = fields.Selection([]) category_purpose = fields.Selection( [ # Full category purpose list found on: @@ -56,7 +55,6 @@ class AccountPaymentLine(models.Model): ("VATX", "VAT Payment"), ("WHLD", "WithHolding"), ], - string="Category Purpose", help="If neither your bank nor your local regulations oblige you to " "set the category purpose, leave the field empty.", ) diff --git a/account_banking_pain_base/models/account_payment_mode.py b/account_banking_pain_base/models/account_payment_mode.py index 139efdfe2..7c7d14603 100644 --- a/account_banking_pain_base/models/account_payment_mode.py +++ b/account_banking_pain_base/models/account_payment_mode.py @@ -10,7 +10,6 @@ class AccountPaymentMode(models.Model): _inherit = "account.payment.mode" initiating_party_issuer = fields.Char( - string="Initiating Party Issuer", size=35, help="This will be used as the 'Initiating Party Issuer' in the " "PAIN files generated by Odoo. If not defined, Initiating Party " @@ -21,7 +20,6 @@ class AccountPaymentMode(models.Model): "- Service suffix (N, issued by bank)", ) initiating_party_identifier = fields.Char( - string="Initiating Party Identifier", size=35, help="This will be used as the 'Initiating Party Identifier' in " "the PAIN files generated by Odoo. If not defined, Initiating Party " @@ -32,7 +30,6 @@ class AccountPaymentMode(models.Model): "- Service suffix (N, issued by bank)", ) initiating_party_scheme = fields.Char( - string="Initiating Party Scheme", size=35, help="This will be used as the 'Initiating Party Scheme Name' in " "the PAIN files generated by Odoo. This value is determined by the " diff --git a/account_banking_pain_base/models/account_payment_order.py b/account_banking_pain_base/models/account_payment_order.py index fd8cc402a..7b4027323 100644 --- a/account_banking_pain_base/models/account_payment_order.py +++ b/account_banking_pain_base/models/account_payment_order.py @@ -32,7 +32,6 @@ class AccountPaymentOrder(models.Model): ("CRED", "Borne by Creditor"), ("DEBT", "Borne by Debtor"), ], - string="Charge Bearer", default="SLEV", readonly=True, states={"draft": [("readonly", False)], "open": [("readonly", False)]}, @@ -48,7 +47,6 @@ class AccountPaymentOrder(models.Model): "debtor.", ) batch_booking = fields.Boolean( - string="Batch Booking", readonly=True, states={"draft": [("readonly", False)], "open": [("readonly", False)]}, tracking=True, @@ -202,15 +200,16 @@ class AccountPaymentOrder(models.Model): "\n".join( [error_msg_prefix] + error_msg_details_list + [error_msg_data] ) - ) + ) from None if not isinstance(value, str): raise UserError( _( - "The type of the field '%s' is %s. It should be a string " - "or unicode." + "The type of the field '%(field)s' is %(value)s. It should be a string " + "or unicode.", + field=field_name, + value=type(value), ) - % (field_name, type(value)) ) if not value: raise UserError( @@ -260,7 +259,7 @@ class AccountPaymentOrder(models.Model): "of the problem : %s" ) % str(e) - ) + ) from None return True def finalize_sepa_file_creation(self, xml_root, gen_args): diff --git a/account_banking_pain_base/models/res_company.py b/account_banking_pain_base/models/res_company.py index 86f812765..c81dc54e2 100644 --- a/account_banking_pain_base/models/res_company.py +++ b/account_banking_pain_base/models/res_company.py @@ -14,19 +14,16 @@ class ResCompany(models.Model): _inherit = "res.company" initiating_party_issuer = fields.Char( - string="Initiating Party Issuer", size=35, help="This will be used as the 'Initiating Party Issuer' in the " "PAIN files generated by Odoo.", ) initiating_party_identifier = fields.Char( - string="Initiating Party Identifier", size=35, help="This will be used as the 'Initiating Party Identifier' in " "the PAIN files generated by Odoo.", ) initiating_party_scheme = fields.Char( - string="Initiating Party Scheme", size=35, help="This will be used as the 'Initiating Party Scheme Name' in " "the PAIN files generated by Odoo.", diff --git a/account_banking_pain_base/readme/CONTRIBUTORS.rst b/account_banking_pain_base/readme/CONTRIBUTORS.rst index c878ad094..46fb01c72 100644 --- a/account_banking_pain_base/readme/CONTRIBUTORS.rst +++ b/account_banking_pain_base/readme/CONTRIBUTORS.rst @@ -13,3 +13,6 @@ * Pedro M. Baeza * Carlos Roca +* `Sygel `_: + + * Manuel Regidor