From 48d2cf8fc2b22d4a8af0d819a78f55a037bd6e02 Mon Sep 17 00:00:00 2001 From: Jinane Maksoud Date: Tue, 31 Jan 2023 12:49:12 +0000 Subject: [PATCH] [FIX] l10n_fr_pos_cert: clear memory after report generation The inalterability report can inflate the memory by loading all the pos orders. closes odoo/odoo#111594 X-original-commit: dcffa8997a1c94309ecab2bf7996b0391b46910c Signed-off-by: Trinh Jacky (trj) --- addons/l10n_fr_pos_cert/models/res_company.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/l10n_fr_pos_cert/models/res_company.py b/addons/l10n_fr_pos_cert/models/res_company.py index 014e4ff7e10..30198c4eaaa 100644 --- a/addons/l10n_fr_pos_cert/models/res_company.py +++ b/addons/l10n_fr_pos_cert/models/res_company.py @@ -73,6 +73,7 @@ class ResCompany(models.Model): corrupted_orders.append(order.name) msg_alert = (_('Corrupted data on point of sale order with id %s.', order.id)) previous_hash = order.l10n_fr_hash + orders.invalidate_recordset() orders_sorted_date = orders.sorted(lambda o: o.date_order) start_order_info = build_order_info(orders_sorted_date[0])