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 * For the time being the default ofxparse lib available with
'pip install ofxparse' do not manage correctly european amount that are 'pip install ofxparse' do not manage correctly european amount that are
written with ',' and not with '.'. (For exemple, The Credit Cooperatif 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: April, 27 2016: this problem has been fixed here:
https://github.com/jseutter/ofxparse/commit/283f89c3246ed3fedccc3ef5c96078b7d5b94579 https://github.com/jseutter/ofxparse/commit/283f89c3246ed3fedccc3ef5c96078b7d5b94579

3
account_bank_statement_import_ofx/__openerp__.py

@ -3,11 +3,14 @@
'name': 'Import OFX Bank Statement', 'name': 'Import OFX Bank Statement',
'category': 'Banking addons', 'category': 'Banking addons',
'version': '9.0.0.0.0', 'version': '9.0.0.0.0',
'license': 'AGPL-3',
'author': 'OpenERP SA,' 'author': 'OpenERP SA,'
'La Louve,' 'La Louve,'
'GRAP,'
'Odoo Community Association (OCA)', 'Odoo Community Association (OCA)',
'website': 'https://odoo-community.org/', 'website': 'https://odoo-community.org/',
'depends': [ 'depends': [
'l10n_generic_coa',
'account_bank_statement_import', 'account_bank_statement_import',
], ],
'data': [ '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 import api, models
from openerp.tools.translate import _ 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 from .ofx import OfxParser, OfxParser_ok
_logger = logging.getLogger(__name__)
class AccountBankStatementImport(models.TransientModel): class AccountBankStatementImport(models.TransientModel):
_inherit = 'account.bank.statement.import' _inherit = 'account.bank.statement.import'
@ -61,7 +61,7 @@ class AccountBankStatementImport(models.TransientModel):
total_amt += float(transaction.amount) total_amt += float(transaction.amount)
transactions.append(vals_line) transactions.append(vals_line)
except Exception, e: 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)) "The file might not be valid.\n\n %s" % e.message))
vals_bank_statement = { vals_bank_statement = {

Loading…
Cancel
Save