Browse Source

[FIX] travis / runbot error

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

2
account_bank_statement_import_ofx/README.rst

@ -31,7 +31,7 @@ this module is based on ofxparse python lib and overload some of its functions.
* For the time being the default ofxparse lib available with
'pip install ofxparse' do not manage correctly european amount that are
written with ',' and not with '.'. (For exemple, The Credit Cooperatif
French Bank provides OFX 1.0 with amounts written with coma)
French Bank provides OFX 1.0 with amounts written with coma)
April, 27 2016: this problem has been fixed here:
https://github.com/jseutter/ofxparse/commit/283f89c3246ed3fedccc3ef5c96078b7d5b94579

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