From 6b0017ffda4dd737a7600e05a4f6d0fa50d90ce4 Mon Sep 17 00:00:00 2001 From: alt-odoo Date: Mon, 23 Nov 2020 09:16:55 +0000 Subject: [PATCH] [FIX] account: wrong number of statement lines to check in dashboard On the accounting dashboard, for bank and cash journals, we are displaying the number of items to check. Since commit https://github.com/odoo/enterprise/commit/b2dd65b9a9c054570d5796a81f2c390c4d8cb6c4, when getting bank statement data, we are filtering the ones that are not reconciled using is_reconciled computed field. We should also include is_reconciled = False when getting dashboard data. closes odoo/odoo#62373 X-original-commit: 8c0e92cdcdf98daa3c841af97e0bd2e4b015a1b9 Signed-off-by: Laurent Smet Signed-off-by: Alex Tuyls --- 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 53d2140d52c..eea762488a5 100644 --- a/addons/account/models/account_journal_dashboard.py +++ b/addons/account/models/account_journal_dashboard.py @@ -431,7 +431,7 @@ class account_journal(models.Model): def to_check_ids(self): self.ensure_one() domain = self.env['account.move.line']._get_suspense_moves_domain() - domain.append(('journal_id', '=', self.id)) + domain += [('journal_id', '=', self.id),('statement_line_id.is_reconciled', '=', False)] statement_line_ids = self.env['account.move.line'].search(domain).mapped('statement_line_id') return statement_line_ids