diff --git a/account_bank_statement_import_ofx/README.rst b/account_bank_statement_import_ofx/README.rst index 34b6c6b..cc06cc1 100644 --- a/account_bank_statement_import_ofx/README.rst +++ b/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 diff --git a/account_bank_statement_import_ofx/__openerp__.py b/account_bank_statement_import_ofx/__openerp__.py index e9ba52f..7e02544 100644 --- a/account_bank_statement_import_ofx/__openerp__.py +++ b/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': [ diff --git a/account_bank_statement_import_ofx/models/account_bank_statement_import.py b/account_bank_statement_import_ofx/models/account_bank_statement_import.py index e5a7ced..c05ee73 100644 --- a/account_bank_statement_import_ofx/models/account_bank_statement_import.py +++ b/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 = {