Skip to content

Commit

Permalink
Merge PR #519 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by AaronHForgeFlow
  • Loading branch information
OCA-git-bot committed Aug 23, 2023
2 parents 3d73875 + 712301a commit 2c6d06a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

import logging

from odoo import fields, models
from odoo import _, fields, models
from odoo.exceptions import UserError

_logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -32,10 +33,11 @@ def _parse_file(self, data_file):
return Parser.parse(
data_file, self.sheet_mapping_id, self.statement_filename
)
except BaseException:
except BaseException as exc:
if self.env.context.get("account_statement_import_txt_xlsx_test"):
raise
_logger.warning("Sheet parser error", exc_info=True)
raise UserError(_("Bad file/mapping: ") + str(exc)) from exc
return super()._parse_file(data_file)

def _create_bank_statements(self, stmts_vals, result):
Expand Down

0 comments on commit 2c6d06a

Please sign in to comment.