From df016246707f291d27fdeb4516cb41fcb8144b1d Mon Sep 17 00:00:00 2001 From: eco-odoo Date: Wed, 19 Sep 2018 13:44:17 +0200 Subject: [PATCH] [FIX] account: dashboard: fix count of number of items to reconcile If a bank statement line has a linked account, it will be skipped by the reconciliation widget and automatically reconciled when the bank statement is closed. Thus, there is no need to count them in the accounting dashboard. --- addons/account/models/account_journal_dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_journal_dashboard.py b/addons/account/models/account_journal_dashboard.py index 56338b54efb..620e6fcc708 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -157,7 +157,7 @@ class account_journal(models.Model): FROM account_bank_statement_line AS line LEFT JOIN account_bank_statement AS st ON line.statement_id = st.id - WHERE st.journal_id IN %s AND st.state = 'open' AND line.amount != 0.0 + WHERE st.journal_id IN %s AND st.state = 'open' AND line.amount != 0.0 AND line.account_id IS NULL AND not exists (select 1 from account_move_line aml where aml.statement_line_id = line.id) """, (tuple(self.ids),)) number_to_reconcile = self.env.cr.fetchone()[0]