From 620008059fb3d5ad3530a2dba17ee058a55c6869 Mon Sep 17 00:00:00 2001 From: Oscar Alvarez Date: Mon, 20 Jan 2014 12:27:15 -0500 Subject: [PATCH] Improvement of perfomance of General Ledger Filter account instead of removing it. Instanciate a new list of record to improve cache. issue3599 review2771003 --- account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account.py b/account.py index f1d7c153e6..a35eb23011 100644 --- a/account.py +++ b/account.py @@ -1176,8 +1176,8 @@ class GeneralLedger(Report): if not data['empty_account']: account2lines = dict(cls.get_lines(accounts, end_periods, data['posted'])) - for account in (set(accounts) - set(account2lines)): - accounts.remove(account) + accounts = Account.browse([a.id for a in accounts + if a in account2lines]) account_id2lines = cls.lines(accounts, list(set(end_periods).difference(set(start_periods))),