[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) <trj@odoo.com>
This commit is contained in:
Jinane Maksoud
2023-02-01 14:38:28 +01:00
parent b4038c915a
commit 48d2cf8fc2
@@ -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])