diff --git a/account_bank_statement_import/account_bank_statement_import.py b/account_bank_statement_import/account_bank_statement_import.py index 9d985f4..b002fa7 100644 --- a/account_bank_statement_import/account_bank_statement_import.py +++ b/account_bank_statement_import/account_bank_statement_import.py @@ -7,7 +7,7 @@ from openerp import api, models, fields from openerp.tools.translate import _ from openerp.exceptions import Warning -_LOGGER = logging.getLogger(__name__) +_logger = logging.getLogger(__name__) class AccountBankStatementLine(models.Model): @@ -231,7 +231,7 @@ class AccountBankStatementImport(models.TransientModel): journal_currency_id = journal_obj.currency.id if currency_id != journal_currency_id: # ALso log message with id's for technical analysis: - _LOGGER.warn( + _logger.warn( _('Statement currency id is %d,' ' but journal currency id = %d.'), currency_id, @@ -245,7 +245,7 @@ class AccountBankStatementImport(models.TransientModel): company_currency_id = self.env.user.company_id.currency_id.id if currency_id != company_currency_id: # ALso log message with id's for technical analysis: - _LOGGER.warn( + _logger.warn( _('Statement currency id is %d,' ' but company currency id = %d.'), currency_id, diff --git a/account_bank_statement_import/tests/test_import_file.py b/account_bank_statement_import/tests/test_import_file.py index f7c190a..71ed1e0 100644 --- a/account_bank_statement_import/tests/test_import_file.py +++ b/account_bank_statement_import/tests/test_import_file.py @@ -26,7 +26,7 @@ from openerp.tests.common import TransactionCase from openerp.modules.module import get_module_resource -_LOGGER = logging.getLogger(__name__) +_logger = logging.getLogger(__name__) class TestStatementFile(TransactionCase): @@ -69,7 +69,7 @@ class TestStatementFile(TransactionCase): "select name, date, amount, ref, bank_account_id" " from account_bank_statement_line" " where statement_id=%d" % statement_obj.id) - _LOGGER.error( + _logger.error( "Transaction not found in %s" % str(self.cr.fetchall()) ) diff --git a/bank_statement_parse_camt/account_bank_statement_import.py b/bank_statement_parse_camt/account_bank_statement_import.py index 47c2033..8814670 100644 --- a/bank_statement_parse_camt/account_bank_statement_import.py +++ b/bank_statement_parse_camt/account_bank_statement_import.py @@ -23,7 +23,7 @@ from openerp import models from .camt import CamtParser as Parser -_LOGGER = logging.getLogger(__name__) +_logger = logging.getLogger(__name__) class AccountBankStatementImport(models.TransientModel): @@ -34,10 +34,11 @@ class AccountBankStatementImport(models.TransientModel): """Parse a CAMT053 XML file.""" parser = Parser() try: - _LOGGER.debug("Try parsing with camt.") + _logger.debug("Try parsing with camt.") return parser.parse(data_file) except ValueError: # Not a camt file, returning super will call next candidate: - _LOGGER.debug("Statement file was not a camt file.") + _logger.debug("Statement file was not a camt file.", + exc_info=True) return super(AccountBankStatementImport, self)._parse_file( cr, uid, data_file, context=context) diff --git a/bank_statement_parse_nl_ing_mt940/account_bank_statement_import.py b/bank_statement_parse_nl_ing_mt940/account_bank_statement_import.py index c488078..1c0c641 100644 --- a/bank_statement_parse_nl_ing_mt940/account_bank_statement_import.py +++ b/bank_statement_parse_nl_ing_mt940/account_bank_statement_import.py @@ -23,7 +23,7 @@ from openerp import models from .mt940 import MT940Parser as Parser -_LOGGER = logging.getLogger(__name__) +_logger = logging.getLogger(__name__) class AccountBankStatementImport(models.TransientModel): @@ -34,10 +34,11 @@ class AccountBankStatementImport(models.TransientModel): """Parse a MT940 IBAN ING file.""" parser = Parser() try: - _LOGGER.debug("Try parsing with MT940 IBAN ING.") + _logger.debug("Try parsing with MT940 IBAN ING.") return parser.parse(data_file) except ValueError: # Returning super will call next candidate: - _LOGGER.debug("Statement file was not a MT940 IBAN ING file.") + _logger.debug("Statement file was not a MT940 IBAN ING file.", + exc_info=True) return super(AccountBankStatementImport, self)._parse_file( cr, uid, data_file, context=context) diff --git a/bank_statement_parse_nl_rabo_mt940/account_bank_statement_import.py b/bank_statement_parse_nl_rabo_mt940/account_bank_statement_import.py index 1d21c08..99a2683 100644 --- a/bank_statement_parse_nl_rabo_mt940/account_bank_statement_import.py +++ b/bank_statement_parse_nl_rabo_mt940/account_bank_statement_import.py @@ -24,7 +24,7 @@ from openerp import models from .mt940 import MT940Parser as Parser -_LOGGER = logging.getLogger(__name__) +_logger = logging.getLogger(__name__) class AccountBankStatementImport(models.TransientModel): @@ -35,11 +35,12 @@ class AccountBankStatementImport(models.TransientModel): """Parse a MT940 RABO file.""" parser = Parser() try: - _LOGGER.debug("Try parsing with MT940 RABO.") + _logger.debug("Try parsing with MT940 RABO.") statements = parser.parse(data_file) return statements except ValueError: # Returning super will call next candidate: - _LOGGER.debug("Statement file was not a MT940 RABO file.") + _logger.debug("Statement file was not a MT940 RABO file.", + exc_info=True) return super(AccountBankStatementImport, self)._parse_file( cr, uid, data_file, context=context)