From d13164d0d89e72f4dfb06768f5a7a756882a5534 Mon Sep 17 00:00:00 2001 From: "Ronald Portier (Therp BV)" Date: Thu, 2 Apr 2015 10:56:50 +0200 Subject: [PATCH] [ENH] Support multiple accounts/currencies. Copy of changes proposed for master. --- .../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 9358ae1..94bd49a 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)) - vals_bank_statement = { + return [{ + 'currency_code': ofx.account.statement.currency, + 'account_number': ofx.account.number, '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] + }]