From 2f8dac0a977b9d42add5e98cdb6cc1aa87cd6452 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Wed, 24 Jun 2020 23:39:33 +0200 Subject: [PATCH] fix cfonb import --- account_ebics/__manifest__.py | 2 +- account_ebics/models/ebics_file.py | 7 +++++-- account_ebics/wizard/ebics_change_passphrase.py | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index ce94094..4db5efa 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'EBICS banking protocol', - 'version': '13.0.1.0.2', + 'version': '13.0.1.0.3', 'license': 'LGPL-3', 'author': 'Noviat', 'category': 'Accounting & Finance', diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 95c6247..622c709 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -1,4 +1,4 @@ -# Copyright 2009-2019 Noviat. +# Copyright 2009-2020 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lpgl). import logging @@ -168,7 +168,10 @@ class EbicsFile(models.Model): import_module = 'account_bank_statement_import_fr_cfonb' self._check_import_module(import_module) wiz_model = 'account.bank.statement.import' - wiz_vals = {'data_file': self.data} + wiz_vals = { + 'attachment_ids': [(0, 0, {'name': self.name, + 'datas': self.data, + 'store_fname': self.name})]} wiz = self.env[wiz_model].create(wiz_vals) res = wiz.import_file() notifications = [] diff --git a/account_ebics/wizard/ebics_change_passphrase.py b/account_ebics/wizard/ebics_change_passphrase.py index ed06a4a..88701d8 100644 --- a/account_ebics/wizard/ebics_change_passphrase.py +++ b/account_ebics/wizard/ebics_change_passphrase.py @@ -1,9 +1,9 @@ -# Copyright 2009-2019 Noviat. +# Copyright 2009-2020 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lpgl). import logging -from odoo import api, fields, models, _ +from odoo import _, fields, models from odoo.exceptions import UserError _logger = logging.getLogger(__name__)