diff --git a/account_bank_statement_import_online/__manifest__.py b/account_bank_statement_import_online/__manifest__.py index 63ea9bc7..eecfd845 100644 --- a/account_bank_statement_import_online/__manifest__.py +++ b/account_bank_statement_import_online/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Online Bank Statements', - 'version': '12.0.1.4.0', + 'version': '12.0.1.4.1', 'author': 'Brainbean Apps, ' 'Dataplug, ' diff --git a/account_bank_statement_import_online/i18n/account_bank_statement_import_online.pot b/account_bank_statement_import_online/i18n/account_bank_statement_import_online.pot index 8f1b695b..c94aa0cb 100644 --- a/account_bank_statement_import_online/i18n/account_bank_statement_import_online.pot +++ b/account_bank_statement_import_online/i18n/account_bank_statement_import_online.pot @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: account_bank_statement_import_online -#: code:addons/account_bank_statement_import_online/models/online_bank_statement_provider.py:153 +#: code:addons/account_bank_statement_import_online/models/online_bank_statement_provider.py:154 #, python-format msgid "%(number)s %(type)s" msgstr "" @@ -117,6 +117,12 @@ msgstr "" msgid "Display Name" msgstr "" +#. module: account_bank_statement_import_online +#: code:addons/account_bank_statement_import_online/models/online_bank_statement_provider.py:197 +#, python-format +msgid "Failed to obtain statement data for period since %s until %s: %s. See server logs for more details." +msgstr "" + #. module: account_bank_statement_import_online #: model:ir.model.fields,field_description:account_bank_statement_import_online.field_online_bank_statement_provider__message_follower_ids msgid "Followers" @@ -159,7 +165,7 @@ msgid "If checked, some messages have a delivery error." msgstr "" #. module: account_bank_statement_import_online -#: code:addons/account_bank_statement_import_online/models/online_bank_statement_provider.py:150 +#: code:addons/account_bank_statement_import_online/models/online_bank_statement_provider.py:151 #: model_terms:ir.ui.view,arch_db:account_bank_statement_import_online.online_bank_statement_provider_filter #, python-format msgid "Inactive" @@ -175,6 +181,12 @@ msgstr "" msgid "Is Follower" msgstr "" +#. module: account_bank_statement_import_online +#: code:addons/account_bank_statement_import_online/models/online_bank_statement_provider.py:206 +#, python-format +msgid "Issue with Online Bank Statement Provider" +msgstr "" + #. module: account_bank_statement_import_online #: model:ir.model,name:account_bank_statement_import_online.model_account_journal #: model:ir.model.fields,field_description:account_bank_statement_import_online.field_online_bank_statement_provider__journal_id @@ -288,19 +300,6 @@ msgstr "" msgid "Online Bank Statement Provider" msgstr "" -#. module: account_bank_statement_import_online -#: code:addons/account_bank_statement_import_online/models/online_bank_statement_provider.py:197 -#, python-format -msgid "Online Bank Statement Provider \"%s\" failed to obtain statement data since %s until %s:\n" -"%s" -msgstr "" - -#. module: account_bank_statement_import_online -#: code:addons/account_bank_statement_import_online/models/online_bank_statement_provider.py:206 -#, python-format -msgid "Online Bank Statement Provider failure" -msgstr "" - #. module: account_bank_statement_import_online #: model_terms:ir.ui.view,arch_db:account_bank_statement_import_online.online_bank_statement_provider_filter msgid "Online Bank Statement Providers" diff --git a/account_bank_statement_import_online/models/online_bank_statement_provider.py b/account_bank_statement_import_online/models/online_bank_statement_provider.py index ee1cbcbb..2d44a0d4 100644 --- a/account_bank_statement_import_online/models/online_bank_statement_provider.py +++ b/account_bank_statement_import_online/models/online_bank_statement_provider.py @@ -5,6 +5,7 @@ from datetime import datetime from dateutil.relativedelta import relativedelta, MO from decimal import Decimal +from html import escape import logging from pytz import timezone, utc from sys import exc_info @@ -182,7 +183,6 @@ class OnlineBankStatementProvider(models.Model): statement_date_until ) except: - e = exc_info()[1] if is_scheduled: _logger.warning( 'Online Bank Statement Provider "%s" failed to' @@ -195,16 +195,16 @@ class OnlineBankStatementProvider(models.Model): ) provider.message_post( body=_( - 'Online Bank Statement Provider "%s" failed to' - ' obtain statement data since %s until %s:\n%s' + 'Failed to obtain statement data for period ' + 'since %s until %s: %s. See server logs for ' + 'more details.' ) % ( - provider.name, statement_date_since, statement_date_until, - str(e) if e else _('N/A'), + escape(str(exc_info()[1])) or _('N/A') ), subject=_( - 'Online Bank Statement Provider failure' + 'Issue with Online Bank Statement Provider' ), ) break