[FIX] account: count in dashboard statement lines marked 'to_check'

1. Reconcile of a bank statement, checking the "To
check" box on the manual operation before validation
2. Go to accounting dashboard

The statement line will not be counted in the "to check" action.
This occur because the action only filter on reconciled moves

This reverts commit 6b0017ffda.

opw-2475663

closes odoo/odoo#69135

X-original-commit: 4f2ba741af913c36dd944070b6cbe5aaf682ced6
Related: odoo/enterprise#17637
Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2021-04-12 15:57:22 +00:00
parent 5ddf7c6fde
commit 1cf1445d3b
@@ -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 += [('journal_id', '=', self.id),('statement_line_id.is_reconciled', '=', False)]
domain.append(('journal_id', '=', self.id))
statement_line_ids = self.env['account.move.line'].search(domain).mapped('statement_line_id')
return statement_line_ids