Skip to content
Snippets Groups Projects
Commit f4c90e7d authored by Victor Feyens's avatar Victor Feyens Committed by Nicolas Martinelli
Browse files

[IMP] account_check_printing: improve journal statistics computation performances


PURPOSE

Improve performances of various Odoo code bits.

SPECIFICATIONS

Use a read_group to compute number of checks to print, using a search_count
instead of a search.

LINKS

Task ID-2281297
PR odoo/odoo#53053
PR odoo/enterprise#11299

closes odoo/odoo#56833

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 9e349c00
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,7 @@ class AccountJournal(models.Model):
]
return dict(
super(AccountJournal, self).get_journal_dashboard_datas(),
num_checks_to_print=len(self.env['account.payment'].search(domain_checks_to_print))
num_checks_to_print=self.env['account.payment'].search_count(domain_checks_to_print),
)
@api.multi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment