From a9670cfce5eb81b971f71a38b68351b7e654f3e6 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 13 Sep 2018 16:21:40 +0200 Subject: [PATCH] [FIX] account: Reconcile a statement with move line from partner Steps to reproduce the bug: - Create a journal "Temporary" with default account (don't care about the names) with Fixed asset type and reconcile = True - Create a vendor bill - Create a payment from this vendor bill in the temporary journal - Create a bank statement and with a line where you specify the vendor - Try to reconcile the temporary account with the bank account Bug: Impossible because the temporary account item was not displayed opw:1884376 --- addons/account/models/account_bank_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 54a61a986e6..9db78e9b5d2 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -569,7 +569,7 @@ class AccountBankStatementLine(models.Model): # Black lines = unreconciled & (not linked to a payment or open balance created by statement domain_matching = [('reconciled', '=', False)] if partner_id or overlook_partner: - domain_matching = expression.AND([domain_matching, [('account_id.internal_type', 'in', ['payable', 'receivable'])]]) + domain_matching = expression.AND([domain_matching, ['|', ('account_id.internal_type', 'in', ['payable', 'receivable']), '&', ('account_id.internal_type', '=', 'other'), ('account_id.reconcile', '=', True)]]) else: # TODO : find out what use case this permits (match a check payment, registered on a journal whose account type is other instead of liquidity) domain_matching = expression.AND([domain_matching, [('account_id.reconcile', '=', True)]])