diff --git a/README.md b/README.md index 72afcb8..25bb777 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Available addons ---------------- addon | version | maintainers | summary --- | --- | --- | --- -[account_ebics](account_ebics/) | 18.0.1.1.1 | | EBICS banking protocol +[account_ebics](account_ebics/) | 18.0.1.1.2 | | EBICS banking protocol [account_ebics_batch](account_ebics_batch/) | 18.0.1.0.0 | | EBICS Files automated import and processing [account_ebics_batch_payment](account_ebics_batch_payment/) | 18.0.1.0.0 | | Upload Batch Payment via EBICS [account_ebics_oca_statement_import](account_ebics_oca_statement_import/) | 18.0.1.0.0 | | Use OCA Bank Statement Import with account_ebics diff --git a/account_ebics/__manifest__.py b/account_ebics/__manifest__.py index 1f47786..e436404 100644 --- a/account_ebics/__manifest__.py +++ b/account_ebics/__manifest__.py @@ -3,7 +3,7 @@ { "name": "EBICS banking protocol", - "version": "18.0.1.1.1", + "version": "18.0.1.1.2", "license": "LGPL-3", "author": "Noviat", "website": "https://www.noviat.com/", diff --git a/account_ebics/i18n/account_ebics.pot b/account_ebics/i18n/account_ebics.pot index 77486fb..592c97b 100644 --- a/account_ebics/i18n/account_ebics.pot +++ b/account_ebics/i18n/account_ebics.pot @@ -660,6 +660,12 @@ msgid "" "(%(order_type)s):" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/wizards/ebics_admin_order.py:0 +msgid "EBICS Technical Error during execution of order %(order_type)s:" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_userid.py:0 diff --git a/account_ebics/i18n/fr.po b/account_ebics/i18n/fr.po index 464e63c..3643f54 100644 --- a/account_ebics/i18n/fr.po +++ b/account_ebics/i18n/fr.po @@ -675,6 +675,12 @@ msgid "" "(order_type)s):" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/wizards/ebics_admin_order.py:0 +msgid "EBICS Technical Error during execution of order %(order_type)s:" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_userid.py:0 diff --git a/account_ebics/i18n/nl.po b/account_ebics/i18n/nl.po index e3917ca..270f7b5 100644 --- a/account_ebics/i18n/nl.po +++ b/account_ebics/i18n/nl.po @@ -675,6 +675,12 @@ msgid "" "(order_type)s):" msgstr "" +#. module: account_ebics +#. odoo-python +#: code:addons/account_ebics/wizards/ebics_admin_order.py:0 +msgid "EBICS Technical Error during execution of order %(order_type)s:" +msgstr "" + #. module: account_ebics #. odoo-python #: code:addons/account_ebics/models/ebics_userid.py:0 diff --git a/account_ebics/wizards/ebics_admin_order.py b/account_ebics/wizards/ebics_admin_order.py index 5f32687..eaed700 100644 --- a/account_ebics/wizards/ebics_admin_order.py +++ b/account_ebics/wizards/ebics_admin_order.py @@ -1,10 +1,18 @@ -# Copyright 2009-2024 Noviat. +# Copyright 2024 Noviat. # License LGPL-3 or later (https://www.gnu.org/licenses/lgpl). +import logging import pprint from odoo import api, fields, models +_logger = logging.getLogger(__name__) + +try: + from fintech.ebics import EbicsTechnicalError +except ImportError: + _logger.warning("Failed to import fintech") + class EbicsAdminOrder(models.TransientModel): _inherit = "ebics.xfer" @@ -34,9 +42,18 @@ class EbicsAdminOrder(models.TransientModel): % self.ebics_config_id.name ) else: - data = getattr(client, self.admin_order_type)(parsed=True) - pp = pprint.PrettyPrinter() - self.note = pp.pformat(data) + try: + data = getattr(client, self.admin_order_type)(parsed=True) + pp = pprint.PrettyPrinter() + self.note = pp.pformat(data) + except EbicsTechnicalError as e: + self.note = "\n" + self.note += self.env._( + "EBICS Technical Error during execution of order %(order_type)s:", + order_type=self.admin_order_type, + ) + self.note += "\n" + self.note += f"{e.message} (code: {e.code})" module = __name__.split("addons.")[1].split(".")[0] result_view = self.env.ref(f"{module}.ebics_admin_order_view_form_result") return {