From 2bb38ca89dc9ad65e983ae908920144dec5b88c9 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 15 Jan 2015 16:42:30 +0100 Subject: [PATCH] [FIX] account: closing of bank statement without reconciliation For bank statement line having an account_id, but no journal_entry_id, it is not possible to reconcile the line in the bank statement reconciliation tool, as a filter is applied to only reconcile lines having journal_entry_id AND account_id not set. As written in the help message of the account_id field: This technical field can be used at the statement line creation/import time in order to avoid the reconciliation process on it later on. The statement line will simply create a counterpart on this account Not allowing the reconciling should not prevent to close the statement in such a case. The button "close" was displayed only when all lines had journal_entry_id set. --- addons/account/account_bank_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index d7e5f8e88a6..6c662f70d85 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -108,7 +108,7 @@ class account_bank_statement(osv.osv): def _all_lines_reconciled(self, cr, uid, ids, name, args, context=None): res = {} for statement in self.browse(cr, uid, ids, context=context): - res[statement.id] = all([line.journal_entry_id.id for line in statement.line_ids]) + res[statement.id] = all([line.journal_entry_id.id or line.account_id.id for line in statement.line_ids]) return res _order = "date desc, id desc"