From 6b0692aef368b66fe1c1d8115b39c91c7a97a749 Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Thu, 6 Apr 2023 22:05:57 +0200 Subject: [PATCH] set account.payment.order state to uploaded upon ebics upload --- account_ebics/__manifest__.py | 2 +- account_ebics/wizards/ebics_xfer.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index f5e5eaf..0b288fc 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "14.0.1.1.2", + "version": "14.0.1.1.3", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com", diff --git a/account_ebics/wizards/ebics_xfer.py b/account_ebics/wizards/ebics_xfer.py index 5603b0e..9ff9f89 100644 --- a/account_ebics/wizards/ebics_xfer.py +++ b/account_ebics/wizards/ebics_xfer.py @@ -1,4 +1,4 @@ -# Copyright 2009-2022 Noviat. +# Copyright 2009-2023 Noviat. # License LGPL-3 or later (http://www.gnu.org/licenses/lpgl). """ @@ -419,8 +419,16 @@ class EbicsXfer(models.TransientModel): OrderID = self.ebics_config_id._get_order_number() self.ebics_config_id.sudo()._update_order_number(OrderID) + ebics_file and self._payment_order_postprocess(ebics_file) 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": + order.generated2uploaded() + def _setup_client(self): self.ebics_config_id._check_ebics_keys() passphrase = self._get_passphrase()