New backport from odoo/master

Fix bug #5
This commit is contained in:
Alexis de Lattre
2015-01-23 22:50:24 +01:00
parent e0e6663ba1
commit c017b6864b
15 changed files with 558 additions and 193 deletions

View File

@@ -2,7 +2,3 @@
# noqa: This is a backport from Odoo. OCA has no control over style here.
# flake8: noqa
from . import test_import_bank_statement
checks = [
test_import_bank_statement
]

View File

@@ -23,10 +23,9 @@ class TestOfxFile(TransactionCase):
ofx_file_path = get_module_resource('account_bank_statement_import_ofx', 'test_ofx_file', 'test_ofx.ofx')
ofx_file = open(ofx_file_path, 'rb').read().encode('base64')
bank_statement_id = self.statement_import_model.create(cr, uid, dict(
file_type='ofx',
data_file=ofx_file,
))
self.statement_import_model.parse_file(cr, uid, [bank_statement_id])
data_file=ofx_file,
))
self.statement_import_model.import_file(cr, uid, [bank_statement_id])
statement_id = self.bank_statement_model.search(cr, uid, [('name', '=', '000000123')])[0]
bank_st_record = self.bank_statement_model.browse(cr, uid, statement_id)
self.assertEquals(bank_st_record.balance_start, 2156.56)