[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.
This commit is contained in:
parent
309e3def30
commit
2bb38ca89d
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue