[14.0][FIX] account_financial_report: Memory problems setting filters

Fixes #814
pull/894/head
Abraham Anes 2022-05-10 12:05:28 +02:00 committed by Pedro M. Baeza
parent 2fe7203eb7
commit 357554ce1c
5 changed files with 7 additions and 5 deletions

View File

@ -5,7 +5,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{ {
"name": "Account Financial Reports", "name": "Account Financial Reports",
"version": "13.0.1.9.1", "version": "13.0.1.9.2",
"category": "Reporting", "category": "Reporting",
"summary": "OCA Financial Reports", "summary": "OCA Financial Reports",
"author": "Camptocamp SA," "author": "Camptocamp SA,"

View File

@ -55,7 +55,8 @@ class AgedPartnerBalanceWizard(models.TransientModel):
end_range = int(self.account_code_to.code) end_range = int(self.account_code_to.code)
self.account_ids = self.env["account.account"].search( self.account_ids = self.env["account.account"].search(
[ [
("code", "in", [x for x in range(start_range, end_range + 1)]), ("code", ">=", start_range),
("code", "<=", end_range),
("reconcile", "=", True), ("reconcile", "=", True),
] ]
) )

View File

@ -103,7 +103,7 @@ class GeneralLedgerReportWizard(models.TransientModel):
start_range = int(self.account_code_from.code) start_range = int(self.account_code_from.code)
end_range = int(self.account_code_to.code) end_range = int(self.account_code_to.code)
self.account_ids = self.env["account.account"].search( self.account_ids = self.env["account.account"].search(
[("code", "in", [x for x in range(start_range, end_range + 1)])] [("code", ">=", start_range), ("code", "<=", end_range)]
) )
if self.company_id: if self.company_id:
self.account_ids = self.account_ids.filtered( self.account_ids = self.account_ids.filtered(

View File

@ -73,7 +73,8 @@ class OpenItemsReportWizard(models.TransientModel):
end_range = int(self.account_code_to.code) end_range = int(self.account_code_to.code)
self.account_ids = self.env["account.account"].search( self.account_ids = self.env["account.account"].search(
[ [
("code", "in", [x for x in range(start_range, end_range + 1)]), ("code", ">=", start_range),
("code", "<=", end_range),
("reconcile", "=", True), ("reconcile", "=", True),
] ]
) )

View File

@ -93,7 +93,7 @@ class TrialBalanceReportWizard(models.TransientModel):
start_range = int(self.account_code_from.code) start_range = int(self.account_code_from.code)
end_range = int(self.account_code_to.code) end_range = int(self.account_code_to.code)
self.account_ids = self.env["account.account"].search( self.account_ids = self.env["account.account"].search(
[("code", "in", [x for x in range(start_range, end_range + 1)])] [("code", ">=", start_range), ("code", "<=", end_range)]
) )
if self.company_id: if self.company_id:
self.account_ids = self.account_ids.filtered( self.account_ids = self.account_ids.filtered(