From 0665a30a1943173619e662fbdf54cdeac37dc5bb Mon Sep 17 00:00:00 2001
From: Julien Ortet <julien@le-filament.com>
Date: Tue, 9 Jan 2024 14:27:33 +0100
Subject: [PATCH]  Add security rules

---
 templates/operation_templates_page.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/operation_templates_page.xml b/templates/operation_templates_page.xml
index b7c0b9b..397be66 100644
--- a/templates/operation_templates_page.xml
+++ b/templates/operation_templates_page.xml
@@ -221,12 +221,12 @@
                                 <t
                                     t-set="prm_ids"
                                     t-if="type_data == 'cons'"
-                                    t-value="operation.acc_delivery_period_ids.filtered(lambda r: r.partner_id == p).mapped('acc_counter_id')"
+                                    t-value="operation.sudo().acc_delivery_period_ids.filtered(lambda r: r.partner_id == p).mapped('acc_counter_id')"
                                 />
                                 <t
                                     t-set="prm_ids"
                                     t-if="type_data == 'prod'"
-                                    t-value="operation.acc_injection_period_ids.filtered(lambda r: r.partner_id == p).mapped('acc_counter_id')"
+                                    t-value="operation.sudo().acc_injection_period_ids.filtered(lambda r: r.partner_id == p).mapped('acc_counter_id')"
                                 />
                                 <t
                                     t-foreach="prm_ids"
-- 
GitLab