Skip to content
Snippets Groups Projects
Commit 313bc91c authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] account: account selection

When a user prints the GL of a given account, the GL of all accounts is
printed. On a production environment, this can generate thousands of
pages (and ultimately, a crash).

opw-676061
parent b9803b3d
No related branches found
No related tags found
No related merge requests found
......@@ -119,7 +119,7 @@ class ReportGeneralLedger(models.AbstractModel):
if data['form'].get('journal_ids', False):
codes = [journal.code for journal in self.env['account.journal'].search([('id', 'in', data['form']['journal_ids'])])]
accounts = self.env['account.account'].search([])
accounts = docs if self.model == 'account.account' else self.env['account.account'].search([])
accounts_res = self.with_context(data['form'].get('used_context',{}))._get_account_move_entry(accounts, init_balance, sortby, display_account)
docargs = {
'doc_ids': self.ids,
......
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