This commit is contained in:
gsinghpal
2026-04-28 19:39:37 -04:00
parent 2d42b33d68
commit 13e300d90e
103 changed files with 4959 additions and 331 deletions

View File

@@ -45,9 +45,8 @@
<field name="active" widget="boolean_toggle"/>
</group>
</group>
<group string="Notes">
<field name="notes" nolabel="1" colspan="2"/>
</group>
<separator string="Notes"/>
<field name="notes" colspan="2"/>
</sheet>
<chatter/>
</form>

View File

@@ -176,12 +176,26 @@
icon="fa-wrench"
class="btn-primary"
help="Open the Process Composer to manage this part's process variants."/>
<button name="action_open_default_simple_editor" type="object"
string="Edit Default (Simple)"
icon="fa-list-alt"
class="btn-info ms-1"
invisible="not default_process_id"
help="Jump straight to the Simple Recipe Editor for the default variant — flat 2-pane drag-drop layout."/>
<button name="action_open_default_tree_editor" type="object"
string="Edit Default (Tree)"
icon="fa-sitemap"
class="btn-secondary ms-1"
invisible="not default_process_id"
help="Jump straight to the Tree Editor for the default variant."/>
</div>
<p class="text-muted mt-3">
The <strong>Compose</strong> button opens the Process Composer where you can add
multiple process <em>variants</em> for this part — for example "Standard ENP",
"Selective Masking", "Rework". One variant is flagged as default; estimators
may pick a different variant on a per-order basis.
may pick a different variant on a per-order basis. Each variant can be edited
in either the <strong>Tree</strong> or <strong>Simple</strong> view — same data,
two layouts.
</p>
<field name="process_variant_ids" readonly="1">
<list>
@@ -189,6 +203,12 @@
<field name="variant_label"/>
<field name="name"/>
<field name="estimated_duration" optional="hide"/>
<button name="action_open_simple_editor" type="object"
string="Simple" icon="fa-list-alt"
class="btn-link"/>
<button name="action_open_tree_editor" type="object"
string="Tree" icon="fa-sitemap"
class="btn-link"/>
</list>
</field>
</page>
@@ -207,9 +227,7 @@
<field name="has_threads"/>
</group>
</group>
<group>
<field name="masking_description" placeholder="e.g. Mask threaded holes, mask bore ID"/>
</group>
<field name="masking_description" placeholder="e.g. Mask threaded holes, mask bore ID"/>
</page>
<page string="Attachments" name="attachments">
<group>

View File

@@ -276,9 +276,7 @@
options="{'currency_field': 'currency_id'}"/>
</group>
</group>
<group>
<field name="price_breakdown_html" readonly="1" nolabel="1" colspan="2"/>
</group>
<field name="price_breakdown_html" readonly="1" colspan="2"/>
</div>
</div>
@@ -299,10 +297,9 @@
<field name="lost_date" readonly="1"/>
</group>
</group>
<group string="Notes">
<field name="lost_details" nolabel="1" colspan="2"
<separator string="Notes"/>
<field name="lost_details" colspan="2"
placeholder="What did we learn? (Price point competitor beat, spec we didn't meet, etc.)"/>
</group>
</page>
<page string="Notes" name="notes">
<field name="notes" placeholder="Internal notes about this quote..."/>

View File

@@ -58,10 +58,9 @@
<field name="internal_description" nolabel="1" colspan="2"
placeholder="What the shop floor sees on the WO / traveler…"/>
</group>
<group string="Customer-Facing Description">
<field name="customer_facing_description" nolabel="1" colspan="2"
<separator string="Customer-Facing Description"/>
<field name="customer_facing_description" colspan="2"
placeholder="Electroless nickel plating per AMS 2404, Class I, Type II…"/>
</group>
</sheet>
</form>
</field>

View File

@@ -0,0 +1,191 @@
<?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.
Phase 2 (2026-04-28) — relocates the fp.serial views from
fusion_plating_bridge_mrp (uninstalled in Sub 11) into configurator
where the model lives. Adds the new state machine to the form +
list with workflow buttons + status badge.
-->
<odoo>
<record id="view_fp_serial_form" model="ir.ui.view">
<field name="name">fp.serial.form</field>
<field name="model">fp.serial</field>
<field name="arch" type="xml">
<form string="Serial Number">
<header>
<button name="action_mark_racked" type="object"
string="Mark Racked" class="btn-primary"
invisible="state != 'received'"/>
<button name="action_mark_in_process" type="object"
string="Start Processing" class="btn-primary"
invisible="state != 'racked'"/>
<button name="action_mark_inspected" type="object"
string="Pass Inspection" class="btn-success"
invisible="state != 'in_process'"/>
<button name="action_mark_packed" type="object"
string="Mark Packed" class="btn-primary"
invisible="state != 'inspected'"/>
<button name="action_mark_shipped" type="object"
string="Mark Shipped" class="btn-success"
invisible="state != 'packed'"/>
<button name="action_mark_on_hold" type="object"
string="Hold" class="btn-warning"
invisible="state in ('on_hold', 'shipped', 'scrapped')"/>
<button name="action_release_hold" type="object"
string="Release Hold" class="btn-secondary"
invisible="state != 'on_hold'"/>
<button name="action_mark_scrapped" type="object"
string="Scrap" class="btn-danger"
invisible="state in ('shipped', 'scrapped')"
confirm="Mark this serial as scrapped? This is reversible only via Reopen."/>
<button name="action_mark_returned" type="object"
string="Returned by Customer" class="btn-secondary"
invisible="state != 'shipped'"/>
<button name="action_reopen" type="object"
string="Reopen" class="btn-secondary"
groups="fusion_plating.group_fusion_plating_manager"
invisible="state not in ('shipped', 'scrapped')"
confirm="Reopen a terminal-state serial? Manager-only override; the chatter audit will record who, when, why."/>
<field name="state" widget="statusbar"
statusbar_visible="received,racked,in_process,inspected,packed,shipped"/>
</header>
<sheet>
<widget name="web_ribbon" title="Scrapped" bg_color="text-bg-danger"
invisible="state != 'scrapped'"/>
<widget name="web_ribbon" title="On Hold" bg_color="text-bg-warning"
invisible="state != 'on_hold'"/>
<div class="oe_button_box" name="button_box">
<button name="action_view_sale_order" type="object"
class="oe_stat_button" icon="fa-file-text-o"
invisible="not sale_order_id">
<div class="o_stat_info">
<span class="o_stat_text">Sale Order</span>
</div>
</button>
<button name="action_view_invoices" type="object"
class="oe_stat_button" icon="fa-money"
invisible="invoice_count == 0">
<field name="invoice_count" widget="statinfo" string="Invoices"/>
</button>
<button name="action_view_part" type="object"
class="oe_stat_button" icon="fa-cube"
invisible="not part_id">
<div class="o_stat_info">
<span class="o_stat_text">Part</span>
</div>
</button>
</div>
<div class="oe_title">
<label for="name" string="Serial #"/>
<h1><field name="name" placeholder="e.g. SN-12345"/></h1>
</div>
<group>
<group>
<field name="customer_id" readonly="1"/>
<field name="part_id" readonly="1"/>
<field name="sale_order_id" readonly="1"/>
<field name="sale_order_line_id" readonly="1"/>
</group>
<group>
<field name="last_state_change" readonly="1"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
</group>
<separator string="Scrap / Return Reason"
invisible="state not in ('scrapped', 'returned', 'on_hold')"/>
<field name="scrap_reason"
invisible="state not in ('scrapped', 'returned', 'on_hold')"
placeholder="What happened? Cause / disposition / who decided..."/>
<separator string="Notes"/>
<field name="notes"/>
</sheet>
<chatter/>
</form>
</field>
</record>
<record id="view_fp_serial_list" model="ir.ui.view">
<field name="name">fp.serial.list</field>
<field name="model">fp.serial</field>
<field name="arch" type="xml">
<list string="Serial Numbers"
decoration-success="state in ('inspected', 'packed', 'shipped')"
decoration-info="state in ('received', 'racked', 'in_process')"
decoration-warning="state in ('on_hold', 'returned')"
decoration-danger="state == 'scrapped'">
<field name="name"/>
<field name="state" widget="badge"
decoration-success="state in ('inspected', 'packed', 'shipped')"
decoration-info="state in ('received', 'racked', 'in_process')"
decoration-warning="state in ('on_hold', 'returned')"
decoration-danger="state == 'scrapped'"/>
<field name="customer_id"/>
<field name="part_id"/>
<field name="sale_order_id"/>
<field name="last_state_change" optional="show"/>
<field name="invoice_count" string="Invoices" optional="hide"/>
<field name="create_date" optional="hide"/>
</list>
</field>
</record>
<record id="view_fp_serial_search" model="ir.ui.view">
<field name="name">fp.serial.search</field>
<field name="model">fp.serial</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="customer_id"/>
<field name="part_id"/>
<field name="sale_order_id"/>
<separator/>
<filter name="state_received" string="Received"
domain="[('state','=','received')]"/>
<filter name="state_in_process" string="In Process"
domain="[('state','=','in_process')]"/>
<filter name="state_inspected" string="Inspected"
domain="[('state','=','inspected')]"/>
<filter name="state_packed" string="Packed"
domain="[('state','=','packed')]"/>
<filter name="state_shipped" string="Shipped"
domain="[('state','=','shipped')]"/>
<separator/>
<filter name="state_on_hold" string="On Hold"
domain="[('state','=','on_hold')]"/>
<filter name="state_scrapped" string="Scrapped"
domain="[('state','=','scrapped')]"/>
<filter name="state_returned" string="Returned"
domain="[('state','=','returned')]"/>
<separator/>
<filter name="active_only" string="In Flight (not shipped/scrapped)"
domain="[('state','not in',('shipped','scrapped'))]"/>
<group>
<filter name="group_state" string="Status"
context="{'group_by': 'state'}"/>
<filter name="group_customer" string="Customer"
context="{'group_by': 'customer_id'}"/>
<filter name="group_part" string="Part"
context="{'group_by': 'part_id'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_serial" model="ir.actions.act_window">
<field name="name">Serial Numbers</field>
<field name="res_model">fp.serial</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_fp_serial_search"/>
</record>
<menuitem id="menu_fp_serial"
name="Serial Numbers"
parent="fusion_plating_configurator.menu_fp_sales"
action="action_fp_serial"
sequence="60"/>
</odoo>

View File

@@ -52,9 +52,7 @@
options="{'currency_field': 'currency_id'}"/>
</group>
</group>
<group>
<field name="description" placeholder="Description of this treatment step..."/>
</group>
<field name="description" placeholder="Description of this treatment step..."/>
<group>
<field name="active" widget="boolean_toggle"/>
</group>

View File

@@ -188,10 +188,9 @@
<field name="x_fc_internal_note" nolabel="1"
placeholder="Internal notes for estimator / planner / shop floor..."/>
</group>
<group string="External Notes (customer-visible)">
<field name="x_fc_external_note" nolabel="1"
<separator string="External Notes (customer-visible)"/>
<field name="x_fc_external_note"
placeholder="Notes that appear on the acknowledgement and portal..."/>
</group>
</group>
</page>
</xpath>
@@ -214,17 +213,33 @@
optional="hide"/>
<field name="x_fc_coating_config_id" optional="show"/>
<field name="x_fc_process_variant_id"
string="Variant"
options="{'no_create': True}"
string="Process / Recipe"
options="{'no_quick_create': True}"
invisible="not x_fc_part_catalog_id"
optional="show"/>
<field name="x_fc_save_as_default_process"
string="Set as Part Default"
widget="boolean_toggle"
invisible="not x_fc_process_variant_id"
optional="hide"/>
<button name="action_customize_process" type="object"
string="Customize" icon="fa-pencil-square-o"
class="btn-link"
invisible="not x_fc_process_variant_id"/>
<field name="x_fc_thickness_id"
options="{'no_create': True}"
invisible="not x_fc_coating_config_id"
optional="show"/>
<field name="x_fc_serial_id"
options="{'no_create_edit': False}"
<field name="x_fc_serial_ids"
widget="many2many_tags"
options="{'no_quick_create': False, 'color_field': 'state_color'}"
optional="show"/>
<field name="x_fc_serial_count"
string="# SN"
optional="hide"/>
<button name="action_open_serial_bulk_add" type="object"
string="Bulk Add Serials" icon="fa-list-ol"
class="btn-link"/>
<field name="x_fc_job_number" optional="show"/>
<field name="x_fc_revision_pick_id"
string="Revision"