mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-22 12:12:03 +00:00
[13.0][ENH]ebics init_1 extra diagnostics
This commit is contained in:
parent
2a976c6090
commit
357952d9b4
@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
'name': 'EBICS banking protocol',
|
||||
'version': '13.0.1.1.1',
|
||||
'version': '13.0.1.1.2',
|
||||
'license': 'LGPL-3',
|
||||
'author': 'Noviat',
|
||||
'website': 'www.noviat.com',
|
||||
|
@ -5,6 +5,7 @@ import base64
|
||||
import logging
|
||||
import os
|
||||
from sys import exc_info
|
||||
from traceback import format_exception
|
||||
from urllib.error import URLError
|
||||
|
||||
from odoo import _, api, fields, models
|
||||
@ -12,6 +13,14 @@ from odoo.exceptions import UserError
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
"""
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
format='[%(asctime)s] %(levelname)s - %(name)s: %(message)s')
|
||||
"""
|
||||
|
||||
|
||||
try:
|
||||
import fintech
|
||||
from fintech.ebics import EbicsKeyRing, EbicsBank, EbicsUser,\
|
||||
@ -171,7 +180,6 @@ class EbicsUserID(models.Model):
|
||||
if not self.ebics_passphrase:
|
||||
raise UserError(
|
||||
_("Set a passphrase."))
|
||||
|
||||
try:
|
||||
keyring = EbicsKeyRing(
|
||||
keys=self.ebics_keys_fn,
|
||||
@ -229,9 +237,15 @@ class EbicsUserID(models.Model):
|
||||
self.ebics_config_id._update_order_number(OrderID)
|
||||
except URLError:
|
||||
exctype, value = exc_info()[:2]
|
||||
tb = "".join(format_exception(*exc_info()))
|
||||
_logger.error(
|
||||
"EBICS INI command error\nUserID: %s\n%s",
|
||||
self.name,
|
||||
tb,
|
||||
)
|
||||
raise UserError(_(
|
||||
"urlopen error:\n url '%s' - %s")
|
||||
% (self.ebics_url, str(value)))
|
||||
% (self.ebics_config_id.ebics_url, str(value)))
|
||||
except EbicsFunctionalError:
|
||||
e = exc_info()
|
||||
error = _("EBICS Functional Error:")
|
||||
|
Loading…
Reference in New Issue
Block a user