feat(plating-menu): Layer 1+2 — explicit groups on top-level menus + submenus
Phase D Tasks D1-D4 of permissions overhaul. Adds explicit groups= attributes to: - 9 top-level Plating menus (matrix per spec Section 2.E) - Quality submenus: Audits, Customer Specs, AVL → QM-only - Compliance hub child submenus (CGP, General, Safety, Aerospace, Nuclear) → QM-only - Operations submenus: Maintenance, Move Log, Labor History → Shop Manager+; Replenishment Suggestions → Manager+ Replaces fragile inheritance + action-ACL-based visibility with explicit per-menu gates. Now every role's menu tree is deterministic. Also adds fusion_plating/tests/test_menu_visibility.py — per-role matrix tests using ir.ui.menu.search_count with the test user. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -116,13 +116,13 @@
|
||||
</record>
|
||||
|
||||
<!-- Phase 1 — under Operations.
|
||||
Phase 3 — supervisor+ only. Operators see their own moves on
|
||||
the tablet; this is an audit view of every move. -->
|
||||
Phase D (perms v2) — Shop Manager+ only. Operators see their
|
||||
own moves on the tablet; this is an audit view of every move. -->
|
||||
<menuitem id="menu_fp_job_step_move"
|
||||
name="Parts & Rack Move Log"
|
||||
parent="menu_fp_operations"
|
||||
action="action_fp_job_step_move"
|
||||
sequence="90"
|
||||
groups="fusion_plating.group_fusion_plating_supervisor"/>
|
||||
groups="fusion_plating.group_fp_shop_manager_v2"/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -133,10 +133,12 @@
|
||||
</record>
|
||||
|
||||
<!-- Phase 1 — re-parented under Operations. -->
|
||||
<!-- Phase D (perms v2) — Shop Manager+ only. Payroll/billing audit. -->
|
||||
<menuitem id="menu_fp_labor_history"
|
||||
name="Labor History"
|
||||
parent="menu_fp_operations"
|
||||
action="action_fp_labor_history"
|
||||
sequence="95"/>
|
||||
sequence="95"
|
||||
groups="fusion_plating.group_fp_shop_manager_v2"/>
|
||||
|
||||
</odoo>
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
sequence="46"
|
||||
web_icon="fusion_plating,static/description/icon.png"
|
||||
action="action_fp_resolve_plating_landing"
|
||||
groups="group_fusion_plating_operator"/>
|
||||
groups="fusion_plating.group_fp_technician,fusion_plating.group_fp_sales_rep"/>
|
||||
|
||||
<!-- ===== 2. CONFIGURATION + 7 Phase-2 buckets ===== -->
|
||||
<menuitem id="menu_fp_config"
|
||||
name="Configuration"
|
||||
parent="menu_fp_root"
|
||||
sequence="90"
|
||||
groups="group_fusion_plating_manager"/>
|
||||
groups="fusion_plating.group_fp_manager"/>
|
||||
|
||||
<menuitem id="menu_fp_config_shop_setup"
|
||||
name="Shop Setup"
|
||||
@@ -71,13 +71,14 @@
|
||||
name="Compliance"
|
||||
parent="menu_fp_root"
|
||||
sequence="50"
|
||||
groups="group_fusion_plating_supervisor"/>
|
||||
groups="fusion_plating.group_fp_quality_manager"/>
|
||||
|
||||
<!-- ===== 4. OPERATIONS ===== -->
|
||||
<menuitem id="menu_fp_operations"
|
||||
name="Operations"
|
||||
parent="menu_fp_root"
|
||||
sequence="18"/>
|
||||
sequence="18"
|
||||
groups="fusion_plating.group_fp_technician"/>
|
||||
|
||||
<!-- ===== 5. CHILD MENUS ===== -->
|
||||
|
||||
@@ -112,13 +113,13 @@
|
||||
action="action_fp_rack"
|
||||
sequence="35"/>
|
||||
|
||||
<!-- Phase 3 — supervisor+: replenishment is a purchasing decision. -->
|
||||
<!-- Phase D (perms v2) — Manager+: replenishment is a purchasing decision. -->
|
||||
<menuitem id="menu_fp_replenishment_suggestions"
|
||||
name="Replenishment Suggestions"
|
||||
parent="menu_fp_operations"
|
||||
action="action_fp_replenishment_suggestion"
|
||||
sequence="40"
|
||||
groups="fusion_plating.group_fusion_plating_supervisor"/>
|
||||
groups="fusion_plating.group_fp_manager"/>
|
||||
|
||||
<!-- Configuration children (referencing the 7 buckets above) -->
|
||||
<menuitem id="menu_fp_replenishment_rules"
|
||||
|
||||
Reference in New Issue
Block a user