Improvement of perfomance of General Ledger

Filter account instead of removing it.
Instanciate a new list of record to improve cache.

issue3599
review2771003
This commit is contained in:
Oscar Alvarez committed 2014-01-20 12:27:15 -05:00
1 parent c31ed993b7
commit 620008059f
1 file changed
+2 -2
+2 -2
View File
@@ -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))),