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>
56 lines
2.1 KiB
XML
56 lines
2.1 KiB
XML
<?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 & Receiving"
|
||
parent="fusion_plating.menu_fp_root"
|
||
sequence="15"
|
||
groups="fusion_plating.group_fp_shop_manager_v2"/>
|
||
|
||
<!-- Inbound (sequences 10–30) -->
|
||
<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 (40–80) added by fusion_plating_logistics -->
|
||
|
||
|
||
</odoo>
|