From 5b6a217b839d09a22e1f68b993c857ef27bd4de1 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Tue, 10 Mar 2026 09:59:49 +0700 Subject: [PATCH] feat: Add a new `ir.rule` to restrict access to MRP Routing Workcenters based on user permissions. --- security/ir_rule.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/security/ir_rule.xml b/security/ir_rule.xml index a724d35..59f003e 100644 --- a/security/ir_rule.xml +++ b/security/ir_rule.xml @@ -99,6 +99,19 @@ ) + + + + MRP Routing Workcenter Allowed Access + + + + ( + [(1, '=', 1)] if user.env.context.get('bypass_user_restriction') or user.has_group('base.group_system') else + [('workcenter_id', 'in', user.sql_allowed_workcenter_ids())] if user.sql_allowed_workcenter_ids() else [(1, '=', 1)] + ) + +