feat(plating-landing): role-based dispatch resolver + picklist expansion
Phase E of permissions overhaul. The landing resolver now dispatches based on the user's highest role (per spec Section 3): Owner -> Manager Desk Quality Mgr -> Quality Dashboard Manager -> Manager Desk Sales Manager -> Sale Orders Shop Manager -> Plant Kanban (v2 layout) or Workstation (legacy) Sales Rep -> Quotations Technician -> Plant Kanban / Workstation User override (x_fc_plating_landing_action_id) still wins; company default and hardcoded Sale Orders are fallbacks. Layout-flag-aware via ir.config_parameter['fusion_plating_shopfloor.layout'] (v2 vs legacy). x_fc_pickable_landing field added to BOTH ir.actions.act_window AND ir.actions.client (Manager Desk / Plant Kanban / Quality Dashboard are client actions). Resolver helper polymorphically calls _render_resolved() on either model. Tagged 3 of 4 new actions pickable: Manager Desk, Plant Kanban, Quality Dashboard. (action_fp_shopfloor_landing doesn't exist as an XML record — it's a JS component name only; legacy layout falls through to company default gracefully via raise_if_not_found=False.) Tightened picklist domain to filter by user accessibility (Technician no longer sees Manager Desk in the dropdown). New compute field res.users.accessible_landing_action_ids runs check_access_rights on each pickable action. Tests in fusion_plating/tests/test_landing_resolver.py. CLAUDE.md updated with two durable rules: - x_fc_pickable_landing lives on BOTH act_window and actions.client - Role-based dispatch precedence and helper API Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
'name': 'Fusion Plating — Quality (QMS)',
|
||||
'version': '19.0.6.6.4',
|
||||
'version': '19.0.6.6.5',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Native QMS for plating shops: NCR, CAPA, calibration, AVL, FAIR, '
|
||||
'internal audits, customer specs, document control. CE + EE compatible.',
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<field name="name">Quality Dashboard</field>
|
||||
<field name="tag">fp_quality_dashboard</field>
|
||||
<field name="target">current</field>
|
||||
<field name="x_fc_pickable_landing" eval="True"/>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fp_quality_dashboard"
|
||||
|
||||
Reference in New Issue
Block a user