From c9c33ba964d450b03e655eb919fd208918b4f37b Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Mon, 17 Oct 2022 21:24:06 +0200 Subject: [PATCH] [14.0]account_ebics - fix _process_result_action --- account_ebics/__manifest__.py | 2 +- account_ebics/models/ebics_file.py | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index bdff11c..ebcd8c9 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "14.0.1.0.4", + "version": "14.0.1.0.5", "license": "LGPL-3", "author": "Noviat", "website": "www.noviat.com", diff --git a/account_ebics/models/ebics_file.py b/account_ebics/models/ebics_file.py index 73e1283..7e5b390 100644 --- a/account_ebics/models/ebics_file.py +++ b/account_ebics/models/ebics_file.py @@ -168,15 +168,14 @@ class EbicsFile(models.Model): return False return True - def _process_result_action(self, res, parser="oca"): + def _process_result_action(self, res): notifications = [] st_line_ids = [] statement_ids = [] sts_data = [] - if parser == "oca": - if res.get("context"): - notifications = res["context"].get("notifications", []) - st_line_ids = res["context"].get("statement_line_ids", []) + if res.get("type") and res["type"] == "ir.actions.client": + notifications = res["context"].get("notifications", []) + st_line_ids = res["context"].get("statement_line_ids", []) if notifications: for notif in notifications: parts = [] @@ -206,7 +205,7 @@ class EbicsFile(models.Model): (tuple(st_line_ids),), ) sts_data = self.env.cr.dictfetchall() - elif parser == "oe": + else: if res.get("res_id"): st_ids = res["res_id"] else: @@ -429,7 +428,7 @@ class EbicsFile(models.Model): _("No financial journal found for Company Bank Account %s") % bank_account ) - return self._process_result_action(res, parser="oe") + return self._process_result_action(res) @staticmethod def _unlink_camt053(self):