From f29b40b62684bd89f37342bbb44e6cbff99f5c59 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Thu, 7 Dec 2023 18:13:30 +0100 Subject: [PATCH] [FIX] EBICS upload stack trace module: account_ebics/wizards/ebics_xfer.py Fix stack trace when uploading payment file directly via EBICS Upload wizard (hence not via 'EBICS Upload' button on payment order). --- account_ebics/wizards/ebics_xfer.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index b2ee29e..ed45f93 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -449,10 +449,9 @@ class EbicsXfer(models.TransientModel): return ebics_file def _payment_order_postprocess(self, ebics_file): - order = self.env[self.env.context["active_model"]].browse( - self.env.context.get("active_id") - ) - if order._name == "account.payment.order": + active_model = self.env.context.get("active_model") + if active_model == "account.payment.order": + order = self.env[active_model].browse(self.env.context["active_id"]) order.generated2uploaded() def _setup_client(self):