diff options
| author | Victor Feyens <vfe@odoo.com> | 2020-06-16 13:35:36 +0000 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2020-08-24 14:19:54 +0000 |
| commit | 7035b99b09152f224e74eed7d6b67a8ab04fdce8 (patch) | |
| tree | c86fe77910d237784e3cd1ff8b77c885ac2a7b1d /addons | |
| parent | 3e30b1e5c1aa25463848d82492f25002bcbf9154 (diff) | |
[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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account_check_printing/models/account_journal.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account_check_printing/models/account_journal.py b/addons/account_check_printing/models/account_journal.py index 70eb02c34f2..e2ff99c0f87 100644 --- a/addons/account_check_printing/models/account_journal.py +++ b/addons/account_check_printing/models/account_journal.py @@ -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): |
