From 3be2b77bd7ba27a5ee65495a4b632dd0fc1df7c0 Mon Sep 17 00:00:00 2001 From: "Ronald Portier (Therp BV)" Date: Fri, 26 Jun 2015 16:02:10 +0200 Subject: [PATCH] [ENH] Support both old and new style parse results. --- .../account_bank_statement_import_ofx.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py b/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py index 94bd49a..9358ae1 100644 --- a/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py +++ b/account_bank_statement_import_ofx/account_bank_statement_import_ofx.py @@ -67,12 +67,12 @@ class AccountBankStatementImport(models.TransientModel): raise Warning(_("The following problem occurred during import. " "The file might not be valid.\n\n %s" % e.message)) - return [{ - 'currency_code': ofx.account.statement.currency, - 'account_number': ofx.account.number, + vals_bank_statement = { 'name': ofx.account.routing_number, 'transactions': transactions, 'balance_start': ofx.account.statement.balance, 'balance_end_real': float(ofx.account.statement.balance) + total_amt, - }] + } + return ofx.account.statement.currency, ofx.account.number, [ + vals_bank_statement]