Tier 2 — Quality & audit readiness:
- T2.1 SPC on thickness readings (fp.certificate)
- spec_min_mils / spec_max_mils auto-pulled from coating config on create
- Computed: std_dev_mils, min/max, cpk, cpk_status (incapable/marginal/
capable/excellent/insufficient)
- Western Electric trend rules (rule 1: any point beyond 3σ; rule 4:
8 consecutive on one side of mean) → trend_alert + explanation
- New SPC group on certificate form with badge-coloured indicators
- T2.2 Operator certification enforcement (fp.operator.certification)
- Per (employee, process_type) records with issued/expires dates,
training record attachment, revocation workflow
- State auto-computed: active → expired when date passes
- MrpWorkorder.button_start() blocks with UserError if current user's
linked hr.employee lacks an active cert for the bath's process_type
- Managers bypass the check; expiring-soon filter in search view
- HR Employee form: "Plating Certifications" tab
- T2.3 Material traceability chain
- fusion.plating.batch.workorder_id (new Many2one) + production_id
(related through WO) for full chain
- fp.certificate gets computed batch_ids / bath_ids / batch_count
- "Batches" stat button → list of batches used for this cert's MO,
with their chemistry logs intact
- T2.4 Pre-treatment as first-class baths
- process_family selection on fusion.plating.process.type
(pre_treatment / plating / post_treatment / bake / strip / passivation /
masking / inspection)
- Bath search view: Pre-Treatments / Plating / Post-Treatments / Strip
quick filters
- Existing bath infra (logs, replenishment, SPC) now applies to pre-
treatment baths equally
Tier 3 — Business / revenue:
- T3.1 Customer-specific price lists (fp.customer.price.list)
- Per (customer, coating_config) with unit_price + basis (per_part /
sqin / sqft / lb)
- effective_from / effective_to for annual contract pricing
- min_quantity for volume breaks (cheapest price at requested qty wins)
- _find_price() helper resolves active entry by date + qty
- Direct Order wizard auto-fills unit_price on (partner, coating, qty)
change unless operator has typed an override
- Configurator menu → Customer Price Lists
- T3.2 Quote win/loss tracking (fp.quote.configurator)
- State values: draft → confirmed (won) / lost / expired / cancelled
- lost_reason selection (price / lead_time / tech / spec_mismatch /
no_bid / no_response / competitor / other) + lost_competitor_name
+ lost_details text
- Action buttons: Mark as Lost (requires reason), Mark as Expired
- won_date auto-set on SO creation; lost_date auto-set on mark_lost
- New "Win / Loss" tab on configurator form
- T3.3 Actuals vs. quoted margin (mrp.production)
- Computed monetary fields: x_fc_consumables_cost, x_fc_labour_cost,
x_fc_actual_cost, x_fc_quoted_revenue, x_fc_margin_actual,
x_fc_margin_pct
- Labour = sum(WO duration × workcentre cost_hour)
- Revenue = SO amount_untaxed via mo.origin lookup
- New "Job Costing" group on MO form with badge-coloured margin
- T3.4 Job consumables tracking (fp.job.consumption)
- One row per consumable event (bath replenisher, masking tape, PPE,
chemistry): product, qty, uom, unit_cost (snapshot), total_cost,
source, optional workorder link
- One2many x_fc_consumption_ids on mrp.production
- "Consumables" stat button on MO → filtered list
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
208 lines
11 KiB
XML
208 lines
11 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>
|
|
|
|
<record id="view_fp_bath_list" model="ir.ui.view">
|
|
<field name="name">fp.bath.list</field>
|
|
<field name="model">fusion.plating.bath</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Baths" decoration-muted="state == 'dumped'"
|
|
decoration-warning="last_log_status == 'warning'"
|
|
decoration-danger="last_log_status == 'out_of_spec'">
|
|
<field name="name"/>
|
|
<field name="tank_id"/>
|
|
<field name="process_type_id"/>
|
|
<field name="facility_id" groups="base.group_multi_company"/>
|
|
<field name="state" widget="badge"
|
|
decoration-success="state == 'operational'"
|
|
decoration-info="state == 'new'"
|
|
decoration-warning="state == 'under_review'"
|
|
decoration-danger="state == 'dump_scheduled'"
|
|
decoration-muted="state == 'dumped'"/>
|
|
<field name="mto_count"/>
|
|
<field name="last_log_date"/>
|
|
<field name="last_log_status" widget="badge"
|
|
decoration-success="last_log_status == 'ok'"
|
|
decoration-warning="last_log_status == 'warning'"
|
|
decoration-danger="last_log_status == 'out_of_spec'"/>
|
|
<field name="makeup_date" optional="hide"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_fp_bath_form" model="ir.ui.view">
|
|
<field name="name">fp.bath.form</field>
|
|
<field name="model">fusion.plating.bath</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Bath">
|
|
<header>
|
|
<button name="action_make_operational" string="Set Operational" type="object"
|
|
class="oe_highlight" invisible="state != 'new'"/>
|
|
<button name="action_mark_under_review" string="Flag for Review" type="object"
|
|
invisible="state not in ('operational',)"/>
|
|
<button name="action_schedule_dump" string="Schedule Dump" type="object"
|
|
invisible="state not in ('operational','under_review')"/>
|
|
<button name="action_dump" string="Dump" type="object"
|
|
invisible="state != 'dump_scheduled'"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="new,operational,under_review,dump_scheduled,dumped"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="%(action_fp_bath_log)d" type="action" class="oe_stat_button" icon="fa-flask"
|
|
context="{'search_default_bath_id': id}">
|
|
<field name="log_count" widget="statinfo" string="Logs"/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<label for="name"/>
|
|
<h1><field name="name" readonly="state != 'new'"/></h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="tank_id"/>
|
|
<field name="process_type_id"/>
|
|
<field name="facility_id" readonly="1"/>
|
|
<field name="volume"/>
|
|
</group>
|
|
<group>
|
|
<field name="makeup_date"/>
|
|
<field name="makeup_by_id"/>
|
|
<field name="mto_count" readonly="1"/>
|
|
<field name="last_log_date" readonly="1"/>
|
|
<field name="last_log_status" readonly="1" widget="badge"
|
|
decoration-success="last_log_status == 'ok'"
|
|
decoration-warning="last_log_status == 'warning'"
|
|
decoration-danger="last_log_status == 'out_of_spec'"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Target Ranges">
|
|
<field name="target_line_ids">
|
|
<list editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="parameter_id"/>
|
|
<field name="target_min"/>
|
|
<field name="target_max"/>
|
|
<field name="uom"/>
|
|
</list>
|
|
</field>
|
|
<p class="text-muted mt-2">
|
|
Per-bath target overrides. If empty, the parameter's default range is used.
|
|
</p>
|
|
</page>
|
|
<page string="Chemistry Logs">
|
|
<field name="log_ids" readonly="1">
|
|
<list decoration-success="status == 'ok'"
|
|
decoration-warning="status == 'warning'"
|
|
decoration-danger="status == 'out_of_spec'">
|
|
<field name="name"/>
|
|
<field name="log_date"/>
|
|
<field name="operator_id"/>
|
|
<field name="shift"/>
|
|
<field name="status"/>
|
|
</list>
|
|
</field>
|
|
</page>
|
|
<page string="Notes">
|
|
<field name="notes"/>
|
|
</page>
|
|
<page string="Dump" invisible="state not in ('dump_scheduled','dumped')">
|
|
<group>
|
|
<field name="dump_scheduled_date"/>
|
|
<field name="dumped_date"/>
|
|
<field name="dump_reason"/>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_fp_bath_kanban" model="ir.ui.view">
|
|
<field name="name">fp.bath.kanban</field>
|
|
<field name="model">fusion.plating.bath</field>
|
|
<field name="arch" type="xml">
|
|
<kanban default_group_by="state" class="o_fp_bath_kanban">
|
|
<field name="id"/>
|
|
<field name="name"/>
|
|
<field name="tank_id"/>
|
|
<field name="process_type_id"/>
|
|
<field name="state"/>
|
|
<field name="last_log_status"/>
|
|
<field name="mto_count"/>
|
|
<field name="status_color"/>
|
|
<templates>
|
|
<t t-name="card">
|
|
<div class="o_fp_card o_fp_bath_card"
|
|
t-att-data-log-status="record.last_log_status.raw_value">
|
|
<div class="d-flex justify-content-between align-items-start">
|
|
<strong class="o_fp_card_title"><field name="name"/></strong>
|
|
<span class="o_fp_health_dot"
|
|
t-att-data-status="record.last_log_status.raw_value or 'ok'"/>
|
|
</div>
|
|
<div class="small text-muted">
|
|
<field name="process_type_id"/>
|
|
</div>
|
|
<div class="small"><i class="fa fa-flask me-1 text-muted"/><field name="tank_id"/></div>
|
|
<div class="d-flex justify-content-between mt-2 small">
|
|
<span class="text-muted">MTO</span>
|
|
<span class="fw-bold"><field name="mto_count"/></span>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_fp_bath_search" model="ir.ui.view">
|
|
<field name="name">fp.bath.search</field>
|
|
<field name="model">fusion.plating.bath</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Baths">
|
|
<field name="name"/>
|
|
<field name="tank_id"/>
|
|
<field name="process_type_id"/>
|
|
<field name="facility_id"/>
|
|
<separator/>
|
|
<filter string="Pre-Treatments" name="family_pre"
|
|
domain="[('process_type_id.process_family', '=', 'pre_treatment')]"/>
|
|
<filter string="Plating Baths" name="family_plating"
|
|
domain="[('process_type_id.process_family', '=', 'plating')]"/>
|
|
<filter string="Post-Treatments" name="family_post"
|
|
domain="[('process_type_id.process_family', '=', 'post_treatment')]"/>
|
|
<filter string="Strip Baths" name="family_strip"
|
|
domain="[('process_type_id.process_family', '=', 'strip')]"/>
|
|
<separator/>
|
|
<filter string="Operational" name="operational" domain="[('state','=','operational')]"/>
|
|
<filter string="Under Review" name="review" domain="[('state','=','under_review')]"/>
|
|
<filter string="Out of Spec" name="oos" domain="[('last_log_status','=','out_of_spec')]"/>
|
|
<filter string="Warning" name="warn" domain="[('last_log_status','=','warning')]"/>
|
|
<separator/>
|
|
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
|
<group>
|
|
<filter string="Facility" name="group_facility" context="{'group_by':'facility_id'}"/>
|
|
<filter string="Process" name="group_process" context="{'group_by':'process_type_id'}"/>
|
|
<filter string="Tank" name="group_tank" context="{'group_by':'tank_id'}"/>
|
|
<filter string="Status" name="group_state" context="{'group_by':'state'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_fp_bath" model="ir.actions.act_window">
|
|
<field name="name">Baths</field>
|
|
<field name="res_model">fusion.plating.bath</field>
|
|
<field name="view_mode">kanban,list,form</field>
|
|
<field name="search_view_id" ref="view_fp_bath_search"/>
|
|
</record>
|
|
|
|
</odoo>
|