From 966216850cc3274d86ab0f9847a7c43071d49ba5 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Wed, 6 Jan 2021 21:21:01 +0100 Subject: [PATCH 1/2] remove duplicate xml record --- account_ebics/data/ebics_file_format.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/account_ebics/data/ebics_file_format.xml b/account_ebics/data/ebics_file_format.xml index da1766f..59fceab 100644 --- a/account_ebics/data/ebics_file_format.xml +++ b/account_ebics/data/ebics_file_format.xml @@ -110,14 +110,6 @@ sdd.xml - - pain.008.001.02.sdd - up - CDD - Sepa Core Direct Debit Order in format pain.008.001.02 - sdd.xml - - pain.008.001.02.sdd up From 1acfa7993619cf60ef5ff03d879a573edaa2b25d Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Wed, 6 Jan 2021 21:22:11 +0100 Subject: [PATCH 2/2] multi-company fix --- account_ebics/wizards/ebics_xfer.py | 6 ++++-- account_ebics_batch_payment/models/account_batch_payment.py | 3 ++- account_ebics_payment_order/models/account_payment_order.py | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index f31df5f..8a8ffeb 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -1,4 +1,4 @@ -# Copyright 2009-2020 Noviat. +# Copyright 2009-2021 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lpgl). """ @@ -311,7 +311,9 @@ class EbicsXfer(models.TransientModel): 'user_id': self._uid, 'ebics_userid_id': self.ebics_userid_id.id, 'note': ef_note, - 'company_ids': [self.env.user.company_id.id], + "company_ids": [ + self.env.context.get("force_company", self.env.company.id) + ], } self._update_ef_vals(ef_vals) ebics_file = self.env['ebics.file'].create(ef_vals) diff --git a/account_ebics_batch_payment/models/account_batch_payment.py b/account_ebics_batch_payment/models/account_batch_payment.py index 316c101..4121fb9 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-2020 Noviat. +# Copyright 2009-2021 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lpgl). from odoo import _, models @@ -29,6 +29,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, } ) diff --git a/account_ebics_payment_order/models/account_payment_order.py b/account_ebics_payment_order/models/account_payment_order.py index 0da4800..64e9442 100644 --- a/account_ebics_payment_order/models/account_payment_order.py +++ b/account_ebics_payment_order/models/account_payment_order.py @@ -1,4 +1,4 @@ -# Copyright 2009-2020 Noviat. +# Copyright 2009-2021 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lpgl). from odoo import _, models @@ -41,6 +41,7 @@ class AccountPaymentOrder(models.Model): 'default_upload_data': attach.datas, 'default_upload_fname': attach.name, 'origin': origin, + 'force_comany': self.company_id.id, }) ebics_xfer = self.env['ebics.xfer'].with_context(ctx).create({}) ebics_xfer._onchange_ebics_config_id()