mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[ENH] Support multiple accounts/currencies.
Copy of changes proposed for master.
This commit is contained in:
committed by
Alexis de Lattre
parent
2eb75e8b62
commit
30c8d0eb86
@@ -67,12 +67,12 @@ class AccountBankStatementImport(models.TransientModel):
|
|||||||
raise Warning(_("The following problem occurred during import. "
|
raise Warning(_("The following problem occurred during import. "
|
||||||
"The file might not be valid.\n\n %s" % e.message))
|
"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,
|
'name': ofx.account.routing_number,
|
||||||
'transactions': transactions,
|
'transactions': transactions,
|
||||||
'balance_start': ofx.account.statement.balance,
|
'balance_start': ofx.account.statement.balance,
|
||||||
'balance_end_real':
|
'balance_end_real':
|
||||||
float(ofx.account.statement.balance) + total_amt,
|
float(ofx.account.statement.balance) + total_amt,
|
||||||
}
|
}]
|
||||||
return ofx.account.statement.currency, ofx.account.number, [
|
|
||||||
vals_bank_statement]
|
|
||||||
|
|||||||
Reference in New Issue
Block a user