summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2018-09-13 16:21:40 +0200
committerGoffin Simon <sig@odoo.com>2018-09-17 09:53:25 +0200
commita9670cfce5eb81b971f71a38b68351b7e654f3e6 (patch)
treebb17b16ce8fcce83a979c54a2211a79efa0f30ff
parent2bf3c29b0c2751f994ecc879cceed898ac4ca0c8 (diff)
[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
-rw-r--r--addons/account/models/account_bank_statement.py2
1 files changed, 1 insertions, 1 deletions
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)]])