From 1bc8b1079cbc287528e0bcbe4cdf36cf3e76c9f4 Mon Sep 17 00:00:00 2001 From: Dmitrijs Ledkovs Date: Wed, 9 Nov 2011 17:10:28 +0000 Subject: [PATCH] [FIX] Recompute statement end balance at the end of the import. Otherwise, it may be "stuck" with an old balance and appearing as red to the user. --- account_banking/wizard/bank_import.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/account_banking/wizard/bank_import.py b/account_banking/wizard/bank_import.py index 106001041..c2abf456b 100644 --- a/account_banking/wizard/bank_import.py +++ b/account_banking/wizard/bank_import.py @@ -842,7 +842,10 @@ class banking_import(osv.osv_memory): i += 1 results.stat_loaded_cnt += 1 - + + #recompute statement end_balance for validation + statement_obj.button_dummy(cursor, uid, imported_statement_ids) + if payment_lines: # As payments lines are treated as individual transactions, the # batch as a whole is only marked as 'done' when all payment lines