From 1f7f80013f67bc66c8e8990e595419b3d038fa8a Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Thu, 4 Aug 2022 20:09:13 +0200 Subject: [PATCH] [MIG] account_ebics_batch_payment: Migration to 14.0 --- account_ebics_batch_payment/README.rst | 5 ----- account_ebics_batch_payment/__manifest__.py | 4 ++-- .../models/account_batch_payment.py | 21 ++++++++++--------- .../views/account_batch_payment_views.xml | 15 +++++++------ 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/account_ebics_batch_payment/README.rst b/account_ebics_batch_payment/README.rst index 5d3ac65..1a28c97 100644 --- a/account_ebics_batch_payment/README.rst +++ b/account_ebics_batch_payment/README.rst @@ -22,8 +22,3 @@ Usage Create your Batch Payment and generate the bank file. Upload the generated file via the 'EBICS Upload' button on the batch payment. - -Known issues / Roadmap -====================== - - * Add support for multiple EBICS connections. diff --git a/account_ebics_batch_payment/__manifest__.py b/account_ebics_batch_payment/__manifest__.py index 60d98a4..fafe9c9 100644 --- a/account_ebics_batch_payment/__manifest__.py +++ b/account_ebics_batch_payment/__manifest__.py @@ -1,9 +1,9 @@ -# Copyright 2009-2020 Noviat. +# Copyright 2009-2022 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lpgl). { "name": "Upload Batch Payment via EBICS", - "version": "13.0.1.1.0", + "version": "14.0.1.1.0", "license": "LGPL-3", "author": "Noviat", "category": "Accounting & Finance", diff --git a/account_ebics_batch_payment/models/account_batch_payment.py b/account_ebics_batch_payment/models/account_batch_payment.py index 4121fb9..033b610 100644 --- a/account_ebics_batch_payment/models/account_batch_payment.py +++ b/account_ebics_batch_payment/models/account_batch_payment.py @@ -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 @@ -13,15 +13,16 @@ class AccountBatchPayment(models.Model): ctx = self.env.context.copy() origin = _("Batch Payment") + ": " + self.name - ebics_config = self.env['ebics.config'].search([ - ('journal_ids', '=', self.journal_id.id), - ('state', '=', 'confirm'), - ]) + ebics_config = self.env["ebics.config"].search( + [ + ("journal_ids", "=", self.journal_id.id), + ("state", "=", "confirm"), + ] + ) if not ebics_config: - raise UserError(_( - "No active EBICS configuration available " - "for the selected bank." - )) + raise UserError( + _("No active EBICS configuration available " "for the selected bank.") + ) if len(ebics_config) == 1: ctx["default_ebics_config_id"] = ebics_config.id ctx.update( @@ -29,7 +30,7 @@ class AccountBatchPayment(models.Model): "default_upload_data": self.export_file, "default_upload_fname": self.export_filename, "origin": origin, - 'force_comany': self.journal_id.company_id.id, + "force_comany": self.journal_id.company_id.id, } ) diff --git a/account_ebics_batch_payment/views/account_batch_payment_views.xml b/account_ebics_batch_payment/views/account_batch_payment_views.xml index f3f07f6..2b7daf3 100644 --- a/account_ebics_batch_payment/views/account_batch_payment_views.xml +++ b/account_ebics_batch_payment/views/account_batch_payment_views.xml @@ -1,16 +1,19 @@ - + account.batch.payment.form account.batch.payment - + -