Files
Odoo-Modules/fusion_plating/fusion_plating_receiving/views/fp_receiving_menu.xml
gsinghpal 36cd4341a7 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>
2026-05-24 01:35:11 -04:00

56 lines
2.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2026 Nexa Systems Inc.
License OPL-1 (Odoo Proprietary License v1.0)
Part of the Fusion Plating product family.
-->
<odoo>
<!-- ===== Window actions (defined BEFORE menus) ===== -->
<record id="action_fp_receiving_pending" model="ir.actions.act_window">
<field name="name">Pending Inspection</field>
<field name="res_model">fp.receiving</field>
<field name="view_mode">list,form</field>
<field name="domain">[('state', '=', 'draft')]</field>
</record>
<record id="action_fp_receiving_discrepancy" model="ir.actions.act_window">
<field name="name">Discrepancies</field>
<field name="res_model">fp.receiving</field>
<field name="view_mode">list,form</field>
<field name="domain">[('state', '=', 'discrepancy')]</field>
</record>
<!-- ===== SHIPPING & RECEIVING — combined menu (v) ===== -->
<!-- Renamed from "Receiving & Inspection" so the same dock workflow -->
<!-- — parts coming in AND parts going out — lives in one place. -->
<!-- Logistics module reparents its 5 menu items under this root. -->
<menuitem id="menu_fp_receiving_root"
name="Shipping &amp; Receiving"
parent="fusion_plating.menu_fp_root"
sequence="15"
groups="fusion_plating.group_fp_shop_manager_v2"/>
<!-- Inbound (sequences 1030) -->
<menuitem id="menu_fp_receiving_all"
name="All Receiving"
parent="menu_fp_receiving_root"
action="action_fp_receiving"
sequence="10"/>
<menuitem id="menu_fp_receiving_pending"
name="Pending Inspection"
parent="menu_fp_receiving_root"
action="action_fp_receiving_pending"
sequence="20"/>
<menuitem id="menu_fp_receiving_discrepancy"
name="Discrepancies"
parent="menu_fp_receiving_root"
action="action_fp_receiving_discrepancy"
sequence="30"/>
<!-- Outbound items (4080) added by fusion_plating_logistics -->
</odoo>