From fa02b798377da3a1c14fddbacfc81b626d862283 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 16 Mar 2017 14:46:26 +0100 Subject: [PATCH] [FIX] account: get_move_lines_for_reconciliation for expenses Steps to reproduce: -Create a new journal called VISA of type=bank -Allow the reconciliation on debit and credit account -Create two expenses (700$ each one)paid by company with the VISA journal -Submit to manager, validate and post the entries -Create a bank statement of -1400$ on Bank journal -Click on reconcile button Bug: the two account move lines linked to the expenses are not available to be reconciled with the statement. In 9.0, it was possible but due to this commit: 9188d0193465e7aca5c7c9a43ee2b16ba00cbae6 the two aml were not available because this two aml had a payment_id, no statement_id and were with an account_id different of the bank journal (not in reconciliation_aml_accounts) because they had been paid with VISA journal. So they were rejected with the domain_reconciliation due to the account_id on VISA journal and they were rejected with the domain_matching due to the payment_id not False and statement_id False. In 9.0, they were accepted with the domain_matching so the same behavior has been done in saas-11. opw:709861 --- 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 2e479d9009a..d38981505cb 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -573,7 +573,7 @@ class AccountBankStatementLine(models.Model): domain_reconciliation = ['&', '&', ('statement_id', '=', False), ('account_id', 'in', reconciliation_aml_accounts), ('payment_id','<>', False)] # Black lines = unreconciled & (not linked to a payment or open balance created by statement - domain_matching = ['&', ('reconciled', '=', False), '|', ('payment_id','=',False), ('statement_id', '<>', False)] + domain_matching = [('reconciled', '=', False)] if self.partner_id.id or overlook_partner: domain_matching = expression.AND([domain_matching, [('account_id.internal_type', 'in', ['payable', 'receivable'])]]) else: