This commit is contained in:
gsinghpal
2026-04-13 02:35:35 -04:00
parent 1176ba68ae
commit 0ff8c0b93f
116 changed files with 14227 additions and 2406 deletions

View File

@@ -53,6 +53,7 @@ Copyright (c) 2026 Nexa Systems Inc. All rights reserved.
'views/mrp_production_views.xml',
'views/fp_quality_hold_views.xml',
'views/fp_batch_views.xml',
'views/fp_workorder_priority_views.xml',
],
'installable': True,
'application': False,

View File

@@ -0,0 +1,102 @@
<?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.
Manager priority dashboard for MRP work orders. Drag-drop kanban
for reordering production priorities. Only visible when MRP bridge
is installed.
-->
<odoo>
<!-- Kanban view for work order prioritisation (MRP bridge required) -->
<record id="view_mrp_workorder_fp_kanban" model="ir.ui.view">
<field name="name">mrp.workorder.fp.priority.kanban</field>
<field name="model">mrp.workorder</field>
<field name="arch" type="xml">
<kanban default_group_by="workcenter_id" default_order="sequence, date_start">
<field name="name"/>
<field name="workcenter_id"/>
<field name="production_id"/>
<field name="state"/>
<field name="sequence"/>
<field name="duration"/>
<field name="qty_remaining"/>
<field name="date_start"/>
<templates>
<t t-name="card">
<div class="oe_kanban_card oe_kanban_global_click">
<div class="o_kanban_record_top mb-0">
<div class="o_kanban_record_headings">
<strong class="o_kanban_record_title">
<field name="production_id"/>
</strong>
</div>
</div>
<div class="o_kanban_record_body">
<div><strong><field name="name"/></strong></div>
<div class="text-muted">
Qty: <field name="qty_remaining"/>
<t t-if="record.duration.raw_value"><field name="duration" widget="float_time"/> elapsed</t>
</div>
</div>
<div class="o_kanban_record_bottom">
<div class="oe_kanban_bottom_left">
<field name="state" widget="badge"
decoration-info="state == 'ready'"
decoration-warning="state == 'progress'"
decoration-success="state == 'done'"/>
</div>
<div class="oe_kanban_bottom_right">
<field name="date_start" widget="date"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<!-- List view for priority management -->
<record id="view_mrp_workorder_fp_list" model="ir.ui.view">
<field name="name">mrp.workorder.fp.priority.list</field>
<field name="model">mrp.workorder</field>
<field name="arch" type="xml">
<list default_order="sequence, date_start">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="production_id"/>
<field name="workcenter_id"/>
<field name="qty_remaining"/>
<field name="duration" widget="float_time"/>
<field name="state" widget="badge"
decoration-info="state == 'ready'"
decoration-warning="state == 'progress'"
decoration-success="state == 'done'"/>
<field name="date_start"/>
</list>
</field>
</record>
<!-- Action: Production Priorities (Shopfloor Manager) -->
<record id="action_fp_workorder_priority" model="ir.actions.act_window">
<field name="name">Production Priorities</field>
<field name="res_model">mrp.workorder</field>
<field name="view_mode">kanban,list,form</field>
<field name="domain">[('state', 'in', ['ready', 'progress', 'pending'])]</field>
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'kanban', 'view_id': ref('view_mrp_workorder_fp_kanban')}),
(0, 0, {'view_mode': 'list', 'view_id': ref('view_mrp_workorder_fp_list')})]"/>
</record>
<!-- Menu: Production Priorities under Operations -->
<menuitem id="menu_fp_workorder_priority"
name="Production Priorities"
parent="fusion_plating.menu_fp_operations"
action="action_fp_workorder_priority"
sequence="10"
groups="fusion_plating.group_fusion_plating_supervisor"/>
</odoo>