[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 X-original-commit: 7035b99b09152f224e74eed7d6b67a8ab04fdce8
This commit is contained in:
committed by
Thibault Delavallée
parent
273af078b1
commit
df3e0a7351
@@ -116,7 +116,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),
|
||||
)
|
||||
|
||||
def action_checks_to_print(self):
|
||||
|
||||
Reference in New Issue
Block a user