Browse Source

[FIX] travis / runbot error

pull/70/head
Sylvain LE GAL 8 years ago
parent
commit
8f625285be
  1. 3
      account_bank_statement_import_ofx/__openerp__.py
  2. 8
      account_bank_statement_import_ofx/models/account_bank_statement_import.py

3
account_bank_statement_import_ofx/__openerp__.py

@ -3,11 +3,14 @@
'name': 'Import OFX Bank Statement',
'category': 'Banking addons',
'version': '9.0.0.0.0',
'license': 'AGPL-3',
'author': 'OpenERP SA,'
'La Louve,'
'GRAP,'
'Odoo Community Association (OCA)',
'website': 'https://odoo-community.org/',
'depends': [
'l10n_generic_coa',
'account_bank_statement_import',
],
'data': [

8
account_bank_statement_import_ofx/models/account_bank_statement_import.py

@ -5,12 +5,12 @@ import StringIO
from openerp import api, models
from openerp.tools.translate import _
from openerp.exceptions import Warning
_logger = logging.getLogger(__name__)
from openerp.exceptions import Warning as UserError
from .ofx import OfxParser, OfxParser_ok
_logger = logging.getLogger(__name__)
class AccountBankStatementImport(models.TransientModel):
_inherit = 'account.bank.statement.import'
@ -61,7 +61,7 @@ class AccountBankStatementImport(models.TransientModel):
total_amt += float(transaction.amount)
transactions.append(vals_line)
except Exception, e:
raise Warning(_("The following problem occurred during import. "
raise UserError(_("The following problem occurred during import. "
"The file might not be valid.\n\n %s" % e.message))
vals_bank_statement = {

Loading…
Cancel
Save