[MIG] account_ebics_batch_payment: Migration to 18.0

This commit is contained in:
Luc De Meyer 2024-12-25 16:05:40 +01:00
parent 2e31a8b98a
commit bc3b864c42
5 changed files with 11 additions and 9 deletions

View File

@ -1,4 +1,4 @@
# Copyright 2009-2023 Noviat. # Copyright 2009-2024 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
from odoo import fields, models from odoo import fields, models

View File

@ -1,4 +1,4 @@
# Copyright 2009-2020 Noviat. # Copyright 2009-2024 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
import logging import logging

View File

@ -1,4 +1,4 @@
# Copyright 2009-2023 Noviat. # Copyright 2009-2024 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
import pprint import pprint

View File

@ -3,7 +3,7 @@
{ {
"name": "Upload Batch Payment via EBICS", "name": "Upload Batch Payment via EBICS",
"version": "17.0.1.0.3", "version": "18.0.1.0.0",
"license": "LGPL-3", "license": "LGPL-3",
"author": "Noviat", "author": "Noviat",
"website": "https://www.noviat.com", "website": "https://www.noviat.com",

View File

@ -1,7 +1,7 @@
# Copyright 2009-2023 Noviat. # Copyright 2009-2024 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3 or later (http://www.gnu.org/licenses/lgpl).
from odoo import _, models from odoo import models
from odoo.exceptions import UserError from odoo.exceptions import UserError
@ -12,7 +12,7 @@ class AccountBatchPayment(models.Model):
self.ensure_one() self.ensure_one()
ctx = self.env.context.copy() ctx = self.env.context.copy()
origin = _("Batch Payment") + ": " + self.name origin = self.env._("Batch Payment") + ": " + self.name
ebics_config = self.env["ebics.config"].search( ebics_config = self.env["ebics.config"].search(
[ [
("journal_ids", "=", self.journal_id.id), ("journal_ids", "=", self.journal_id.id),
@ -21,7 +21,9 @@ class AccountBatchPayment(models.Model):
) )
if not ebics_config: if not ebics_config:
raise UserError( raise UserError(
_("No active EBICS configuration available " "for the selected bank.") self.env._(
"No active EBICS configuration available for the selected bank."
)
) )
if len(ebics_config) == 1: if len(ebics_config) == 1:
ctx["default_ebics_config_id"] = ebics_config.id ctx["default_ebics_config_id"] = ebics_config.id
@ -43,7 +45,7 @@ class AccountBatchPayment(models.Model):
ebics_xfer._onchange_upload_data() ebics_xfer._onchange_upload_data()
view = self.env.ref("account_ebics.ebics_xfer_view_form_upload") view = self.env.ref("account_ebics.ebics_xfer_view_form_upload")
act = { act = {
"name": _("EBICS Upload"), "name": self.env._("EBICS Upload"),
"view_type": "form", "view_type": "form",
"view_mode": "form", "view_mode": "form",
"res_model": "ebics.xfer", "res_model": "ebics.xfer",