mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
@@ -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
|
||||
]
|
||||
|
||||
|
||||
@@ -20,10 +20,12 @@ class TestQifFile(TransactionCase):
|
||||
qif_file_path = get_module_resource('account_bank_statement_import_qif', 'test_qif_file', 'test_qif.qif')
|
||||
qif_file = open(qif_file_path, 'rb').read().encode('base64')
|
||||
bank_statement_id = self.statement_import_model.create(cr, uid, dict(
|
||||
file_type='qif',
|
||||
data_file=qif_file,
|
||||
))
|
||||
self.statement_import_model.parse_file(cr, uid, [bank_statement_id])
|
||||
data_file=qif_file,
|
||||
))
|
||||
context = {
|
||||
'journal_id': self.registry('ir.model.data').get_object_reference(cr, uid, 'account', 'bank_journal')[1]
|
||||
}
|
||||
self.statement_import_model.import_file(cr, uid, [bank_statement_id], context=context)
|
||||
line_id = self.bank_statement_line_model.search(cr, uid, [('name', '=', 'YOUR LOCAL SUPERMARKET')])[0]
|
||||
statement_id = self.bank_statement_line_model.browse(cr, uid, line_id).statement_id.id
|
||||
bank_st_record = self.bank_statement_model.browse(cr, uid, statement_id)
|
||||
|
||||
Reference in New Issue
Block a user