feat(bridge_mrp): SO smart buttons for full production lifecycle
Sale Order form now hubs the full flow — Manufacturing, Work Orders, Portal Jobs, Quality Holds, Certificates, Deliveries — hidden when count == 0. Clicking each jumps to the filtered list/form so users can drill in without leaving the SO. Counts are computed on the fly from: mrp.production.origin == SO.name, production.workorder_ids, production.x_fc_portal_job_id, quality.hold production_id, fp.certificate.sale_order_id, fp.delivery.job_ref. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?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.
|
||||
|
||||
Adds production-lifecycle smart buttons to the Sale Order form:
|
||||
Manufacturing, Work Orders, Portal Job, Quality Holds, Certificates, Deliveries.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_sale_order_form_fp_bridge_mrp" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.fp.bridge.mrp</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_view_productions" type="object"
|
||||
class="oe_stat_button" icon="fa-industry"
|
||||
invisible="x_fc_production_count == 0">
|
||||
<field name="x_fc_production_count" widget="statinfo"
|
||||
string="Manufacturing"/>
|
||||
</button>
|
||||
<button name="action_view_workorders" type="object"
|
||||
class="oe_stat_button" icon="fa-cogs"
|
||||
invisible="x_fc_workorder_count == 0">
|
||||
<field name="x_fc_workorder_count" widget="statinfo"
|
||||
string="Work Orders"/>
|
||||
</button>
|
||||
<button name="action_view_portal_jobs" type="object"
|
||||
class="oe_stat_button" icon="fa-globe"
|
||||
invisible="x_fc_portal_job_count == 0">
|
||||
<field name="x_fc_portal_job_count" widget="statinfo"
|
||||
string="Portal Jobs"/>
|
||||
</button>
|
||||
<button name="action_view_quality_holds" type="object"
|
||||
class="oe_stat_button" icon="fa-exclamation-triangle"
|
||||
invisible="x_fc_quality_hold_count == 0">
|
||||
<field name="x_fc_quality_hold_count" widget="statinfo"
|
||||
string="Quality Holds"/>
|
||||
</button>
|
||||
<button name="action_view_certificates" type="object"
|
||||
class="oe_stat_button" icon="fa-certificate"
|
||||
invisible="x_fc_certificate_count == 0">
|
||||
<field name="x_fc_certificate_count" widget="statinfo"
|
||||
string="Certificates"/>
|
||||
</button>
|
||||
<button name="action_view_fp_deliveries" type="object"
|
||||
class="oe_stat_button" icon="fa-truck"
|
||||
invisible="x_fc_delivery_count == 0">
|
||||
<field name="x_fc_delivery_count" widget="statinfo"
|
||||
string="Deliveries"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user