changes
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2026 Nexa Systems Inc.
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
Extend batch form with work order M2M when MRP bridge is installed.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_fp_batch_form_mrp_bridge" model="ir.ui.view">
|
||||
<field name="name">fusion.plating.batch.form.mrp.bridge</field>
|
||||
<field name="model">fusion.plating.batch</field>
|
||||
<field name="inherit_id" ref="fusion_plating_batch.view_fp_batch_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='chemistry_ids']/.." position="after">
|
||||
<page string="Work Orders" name="work_orders">
|
||||
<field name="workorder_ids" widget="many2many_tags"/>
|
||||
<p class="text-muted" invisible="workorder_ids">
|
||||
Link MRP work orders processed in this batch for full traceability.
|
||||
</p>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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.
|
||||
Extend the quality hold form with MRP fields when the bridge is installed.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_fp_quality_hold_form_mrp_bridge" model="ir.ui.view">
|
||||
<field name="name">fusion.plating.quality.hold.form.mrp.bridge</field>
|
||||
<field name="model">fusion.plating.quality.hold</field>
|
||||
<field name="inherit_id" ref="fusion_plating_quality.view_fp_quality_hold_form"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//group[@name='resolution']" position="before">
|
||||
<group string="Source"
|
||||
invisible="not workorder_id and not production_id and not portal_job_id">
|
||||
<field name="workorder_id" readonly="1"/>
|
||||
<field name="production_id" readonly="1"/>
|
||||
<field name="portal_job_id" readonly="1"/>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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>
|
||||
|
||||
<!-- Extend mrp.production form: add Fusion Plating fields -->
|
||||
<record id="view_mrp_production_form_fp_bridge" model="ir.ui.view">
|
||||
<field name="name">mrp.production.form.fp.bridge</field>
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//sheet" position="inside">
|
||||
<group string="Fusion Plating" name="fusion_plating">
|
||||
<group>
|
||||
<field name="x_fc_customer_spec_id"/>
|
||||
<field name="x_fc_facility_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="x_fc_portal_job_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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>
|
||||
|
||||
<!-- Extend mrp.workcenter form: add Fusion Plating group -->
|
||||
<record id="view_mrp_workcenter_form_fp_bridge" model="ir.ui.view">
|
||||
<field name="name">mrp.workcenter.form.fp.bridge</field>
|
||||
<field name="model">mrp.workcenter</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_workcenter_view"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<xpath expr="//sheet" position="inside">
|
||||
<group string="Fusion Plating" name="fusion_plating">
|
||||
<group>
|
||||
<field name="x_fc_facility_id"/>
|
||||
<field name="x_fc_fp_work_center_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,200 @@
|
||||
<?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.
|
||||
|
||||
Hub & Spoke layout for Work Order form:
|
||||
- Smart buttons (SO, MO, Portal Job, Quality Holds, Deliveries)
|
||||
- Process flow bar with step badge + tree action
|
||||
- 5-tab notebook: Time & Cost | Plating Details | Quality | Components | Blocked By
|
||||
- Chatter
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_mrp_workorder_form_fp_bridge" model="ir.ui.view">
|
||||
<field name="name">mrp.workorder.form.fp.bridge</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<!-- ============================================================
|
||||
1. HIDDEN COMPUTED FIELDS (inside sheet, after company_id)
|
||||
============================================================ -->
|
||||
<xpath expr="//sheet//field[@name='company_id']" position="after">
|
||||
<field name="x_fc_sale_order_id" invisible="1"/>
|
||||
<field name="x_fc_portal_job_id" invisible="1"/>
|
||||
<field name="x_fc_sale_order_name" invisible="1"/>
|
||||
<field name="x_fc_production_name" invisible="1"/>
|
||||
<field name="x_fc_step_number" invisible="1"/>
|
||||
<field name="x_fc_total_steps" invisible="1"/>
|
||||
</xpath>
|
||||
|
||||
<!-- ============================================================
|
||||
2. SMART BUTTONS (inside button_box)
|
||||
============================================================ -->
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<!-- Sale Order -->
|
||||
<button name="action_view_sale_order" type="object"
|
||||
class="oe_stat_button" icon="fa-file-text-o"
|
||||
invisible="not x_fc_sale_order_id">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="x_fc_sale_order_name" nolabel="1"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Sale Order</span>
|
||||
</div>
|
||||
</button>
|
||||
<!-- Manufacturing Order -->
|
||||
<button name="action_view_manufacturing_order" type="object"
|
||||
class="oe_stat_button" icon="fa-industry">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_value">
|
||||
<field name="x_fc_production_name" nolabel="1"/>
|
||||
</span>
|
||||
<span class="o_stat_text">Manufacturing</span>
|
||||
</div>
|
||||
</button>
|
||||
<!-- Portal Job -->
|
||||
<button name="action_view_portal_job" type="object"
|
||||
class="oe_stat_button" icon="fa-globe"
|
||||
invisible="not x_fc_portal_job_id">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Portal Job</span>
|
||||
</div>
|
||||
</button>
|
||||
<!-- Quality Holds -->
|
||||
<button name="action_view_quality_holds" type="object"
|
||||
class="oe_stat_button" icon="fa-exclamation-triangle">
|
||||
<field name="x_fc_quality_hold_count" widget="statinfo"
|
||||
string="Quality Holds"/>
|
||||
</button>
|
||||
<!-- Deliveries -->
|
||||
<button name="action_view_deliveries" type="object"
|
||||
class="oe_stat_button" icon="fa-truck">
|
||||
<field name="x_fc_delivery_count" widget="statinfo"
|
||||
string="Deliveries"/>
|
||||
</button>
|
||||
</xpath>
|
||||
|
||||
<!-- ============================================================
|
||||
3. CUSTOMER FIELD — left column, after workcenter_id
|
||||
============================================================ -->
|
||||
<xpath expr="//sheet//field[@name='workcenter_id']" position="after">
|
||||
<field name="x_fc_customer_id" readonly="1"
|
||||
options="{'no_open': False}"/>
|
||||
</xpath>
|
||||
|
||||
<!-- ============================================================
|
||||
3b. STEP BADGE + PRIORITY — right column, after production_id
|
||||
============================================================ -->
|
||||
<xpath expr="//sheet//field[@name='production_id']" position="after">
|
||||
<field name="x_fc_step_display" widget="badge" readonly="1"/>
|
||||
<field name="x_fc_priority" widget="priority"/>
|
||||
</xpath>
|
||||
|
||||
<!-- ============================================================
|
||||
4. PROCESS FLOW BAR (before notebook)
|
||||
============================================================ -->
|
||||
<xpath expr="//notebook" position="before">
|
||||
<div class="o_fp_process_flow mb-3">
|
||||
<div class="d-flex align-items-center gap-2 px-3 py-2 bg-light rounded">
|
||||
<i class="fa fa-random text-primary"/>
|
||||
<span class="fw-bold">Process Flow:</span>
|
||||
<field name="x_fc_step_display" widget="badge"
|
||||
readonly="1" nolabel="1"/>
|
||||
<span class="text-muted">|</span>
|
||||
<span class="text-muted small">
|
||||
Click "View Process Tree" for full routing
|
||||
</span>
|
||||
<button name="action_view_process_tree" type="object"
|
||||
string="View Process Tree"
|
||||
class="btn btn-sm btn-outline-primary ms-auto"
|
||||
icon="fa-sitemap"/>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
<!-- ============================================================
|
||||
5. NOTEBOOK — restructured tabs
|
||||
============================================================ -->
|
||||
|
||||
<!-- 5a. Rename "Time Tracking" → "Time & Cost" and add cost summary -->
|
||||
<xpath expr="//notebook/page[@name='time_tracking']" position="attributes">
|
||||
<attribute name="string">Time & Cost</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//notebook/page[@name='time_tracking']" position="inside">
|
||||
<group string="Cost Summary" name="cost_summary">
|
||||
<group>
|
||||
<field name="x_fc_workcenter_cost_hour"
|
||||
string="Station Rate ($/hr)" readonly="1"/>
|
||||
<field name="duration" widget="float_time"
|
||||
string="Actual Duration" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="duration_expected" widget="float_time"
|
||||
string="Expected Duration" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
<!-- 5b. Plating Details tab (insert AFTER Time & Cost) -->
|
||||
<xpath expr="//notebook/page[@name='time_tracking']" position="after">
|
||||
<page string="Plating Details" name="plating_details">
|
||||
<group>
|
||||
<group string="Bath & Tank">
|
||||
<field name="x_fc_facility_id"/>
|
||||
<field name="x_fc_bath_id"/>
|
||||
<field name="x_fc_tank_id"/>
|
||||
<field name="x_fc_rack_ref"/>
|
||||
</group>
|
||||
<group string="Process Parameters">
|
||||
<field name="x_fc_thickness_target"/>
|
||||
<field name="x_fc_thickness_uom"/>
|
||||
<field name="x_fc_dwell_time_minutes"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
|
||||
<!-- 5c. Quality tab (insert AFTER Plating Details) -->
|
||||
<xpath expr="//notebook/page[@name='plating_details']" position="after">
|
||||
<page string="Quality" name="quality">
|
||||
<div class="mb-3">
|
||||
<button name="action_view_quality_holds" type="object"
|
||||
string="View Quality Holds"
|
||||
class="btn btn-sm btn-outline-warning"
|
||||
icon="fa-exclamation-triangle"/>
|
||||
</div>
|
||||
<p class="text-muted" invisible="x_fc_quality_hold_count > 0">
|
||||
No quality holds on this work order.
|
||||
</p>
|
||||
<div invisible="x_fc_quality_hold_count == 0">
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa fa-exclamation-triangle me-1"/>
|
||||
<strong>
|
||||
<field name="x_fc_quality_hold_count" nolabel="1"/>
|
||||
quality hold(s)
|
||||
</strong>
|
||||
on this work order. Click the button above to review.
|
||||
</div>
|
||||
</div>
|
||||
</page>
|
||||
</xpath>
|
||||
|
||||
<!-- 5d. Components tab already exists at name="components" — no change needed -->
|
||||
|
||||
<!-- 5e. Blocked By tab — keep existing, just push it last visually
|
||||
(it's already the last page in the base view, so no reorder needed) -->
|
||||
|
||||
<!-- ============================================================
|
||||
6. CHATTER (after sheet)
|
||||
============================================================ -->
|
||||
<xpath expr="//sheet" position="after">
|
||||
<chatter/>
|
||||
</xpath>
|
||||
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user