[MIG] account_ebics_payment_order: Migration to 15.0

This commit is contained in:
Luc De Meyer
2022-11-24 22:04:58 +01:00
parent f720844f1a
commit 298329030d
3 changed files with 13 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 2009-2021 Noviat.
# Copyright 2009-2022 Noviat.
# License LGPL-3 or later (http://www.gnu.org/licenses/lpgl).
from odoo import _, models
@@ -10,7 +10,6 @@ class AccountPaymentOrder(models.Model):
def ebics_upload(self):
self.ensure_one()
ctx = self._context.copy()
attach = self.env["ir.attachment"].search(
[("res_model", "=", self._name), ("res_id", "=", self.id)]
)
@@ -45,6 +44,7 @@ class AccountPaymentOrder(models.Model):
"for the selected bank."
)
)
ctx = self.env.context.copy()
if len(ebics_config) == 1:
ctx["default_ebics_config_id"] = ebics_config.id
ctx.update(
@@ -55,7 +55,7 @@ class AccountPaymentOrder(models.Model):
"force_comany": self.company_id.id,
}
)
ebics_xfer = self.env["ebics.xfer"].with_context(ctx).create({})
ebics_xfer = self.env["ebics.xfer"].with_context(**ctx).create({})
ebics_xfer._onchange_ebics_config_id()
ebics_xfer._onchange_upload_data()
ebics_xfer._onchange_format_id()