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

Fixes #814
This commit is contained in:
Abraham Anes
2022-05-10 12:05:28 +02:00
committed by chaule97
parent 2b45a4c62f
commit 10fd4a2e37
5 changed files with 7 additions and 5 deletions

View File

@@ -6,7 +6,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": "15.0.1.0.0", "version": "15.0.1.0.1",
"category": "Reporting", "category": "Reporting",
"summary": "OCA Financial Reports", "summary": "OCA Financial Reports",
"author": "Camptocamp SA," "author": "Camptocamp SA,"

View File

@@ -53,7 +53,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

@@ -105,7 +105,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

@@ -72,7 +72,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

@@ -89,7 +89,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(