190 lines
8.6 KiB
XML
190 lines
8.6 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>
|
|
|
|
<!-- ===== LIST VIEW ===== -->
|
|
<record id="view_fp_quality_hold_list" model="ir.ui.view">
|
|
<field name="name">fusion.plating.quality.hold.list</field>
|
|
<field name="model">fusion.plating.quality.hold</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Quality Holds" default_order="create_date desc">
|
|
<field name="name" decoration-bf="1"/>
|
|
<field name="part_ref"/>
|
|
<field name="qty_on_hold"/>
|
|
<field name="hold_reason"/>
|
|
<field name="state"
|
|
widget="badge"
|
|
decoration-warning="state == 'on_hold'"
|
|
decoration-info="state == 'under_review'"
|
|
decoration-success="state == 'released'"
|
|
decoration-danger="state == 'scrapped'"
|
|
decoration-muted="state == 'reworked'"/>
|
|
<field name="facility_id" optional="show"/>
|
|
<field name="work_center_id" optional="show"/>
|
|
<field name="operator_id"/>
|
|
<field name="create_date"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== FORM VIEW ===== -->
|
|
<record id="view_fp_quality_hold_form" model="ir.ui.view">
|
|
<field name="name">fusion.plating.quality.hold.form</field>
|
|
<field name="model">fusion.plating.quality.hold</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Quality Hold">
|
|
<header>
|
|
<button name="action_start_review"
|
|
string="Start Review"
|
|
type="object"
|
|
class="btn-primary"
|
|
invisible="state != 'on_hold'"/>
|
|
<button name="action_release"
|
|
string="Release"
|
|
type="object"
|
|
class="btn-primary"
|
|
invisible="state not in ('on_hold', 'under_review')"/>
|
|
<button name="action_scrap"
|
|
string="Scrap"
|
|
type="object"
|
|
class="btn-danger"
|
|
invisible="state not in ('on_hold', 'under_review')"/>
|
|
<button name="action_send_to_rework"
|
|
string="Send to Rework"
|
|
type="object"
|
|
invisible="state not in ('on_hold', 'under_review')"/>
|
|
<button name="action_create_ncr"
|
|
string="Create NCR"
|
|
type="object"
|
|
invisible="ncr_id"/>
|
|
<field name="state"
|
|
widget="statusbar"
|
|
statusbar_visible="on_hold,under_review,released"/>
|
|
</header>
|
|
<sheet>
|
|
<div class="oe_title">
|
|
<h1><field name="name" readonly="1"/></h1>
|
|
</div>
|
|
<group>
|
|
<group string="Hold Details">
|
|
<field name="part_ref"/>
|
|
<field name="qty_on_hold"/>
|
|
<field name="qty_original"/>
|
|
<field name="mark_for_scrap"/>
|
|
</group>
|
|
<group string="Context">
|
|
<field name="hold_reason"/>
|
|
<field name="facility_id"/>
|
|
<field name="work_center_id"/>
|
|
<field name="current_process_node"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<field name="description" placeholder="Describe the reason for the hold..."/>
|
|
</group>
|
|
<group string="Attachments">
|
|
<field name="attachment_ids" widget="many2many_binary" nolabel="1"/>
|
|
</group>
|
|
<!-- Source fields (workorder, production, portal_job) are
|
|
added by fusion_plating_bridge_mrp when installed. -->
|
|
<group string="Resolution" name="resolution"
|
|
invisible="state == 'on_hold'">
|
|
<field name="resolved_by_id" readonly="1"/>
|
|
<field name="resolution_date" readonly="1"/>
|
|
<field name="resolution_notes"/>
|
|
<field name="ncr_id" readonly="1"/>
|
|
</group>
|
|
<group string="Other">
|
|
<field name="operator_id"/>
|
|
<field name="company_id" invisible="1"/>
|
|
<field name="active" invisible="1"/>
|
|
</group>
|
|
</sheet>
|
|
<chatter/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== KANBAN VIEW ===== -->
|
|
<record id="view_fp_quality_hold_kanban" model="ir.ui.view">
|
|
<field name="name">fusion.plating.quality.hold.kanban</field>
|
|
<field name="model">fusion.plating.quality.hold</field>
|
|
<field name="arch" type="xml">
|
|
<kanban default_group_by="state" class="o_kanban_small_column">
|
|
<templates>
|
|
<t t-name="card">
|
|
<field name="name" class="fw-bold"/>
|
|
<div>
|
|
<field name="part_ref"/> —
|
|
<field name="qty_on_hold"/> pcs
|
|
</div>
|
|
<div>
|
|
<field name="hold_reason" widget="badge"/>
|
|
</div>
|
|
<div class="text-muted">
|
|
<field name="operator_id" widget="many2one_avatar_user"/>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== SEARCH VIEW ===== -->
|
|
<record id="view_fp_quality_hold_search" model="ir.ui.view">
|
|
<field name="name">fusion.plating.quality.hold.search</field>
|
|
<field name="model">fusion.plating.quality.hold</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Quality Holds">
|
|
<field name="name"/>
|
|
<field name="part_ref"/>
|
|
<field name="operator_id"/>
|
|
<filter name="on_hold" string="On Hold"
|
|
domain="[('state', '=', 'on_hold')]"/>
|
|
<filter name="under_review" string="Under Review"
|
|
domain="[('state', '=', 'under_review')]"/>
|
|
<filter name="released" string="Released"
|
|
domain="[('state', '=', 'released')]"/>
|
|
<filter name="scrapped" string="Scrapped"
|
|
domain="[('state', '=', 'scrapped')]"/>
|
|
<filter name="reworked" string="Reworked"
|
|
domain="[('state', '=', 'reworked')]"/>
|
|
<separator/>
|
|
<group>
|
|
<filter name="group_hold_reason" string="Hold Reason"
|
|
context="{'group_by': 'hold_reason'}"/>
|
|
<filter name="group_facility" string="Facility"
|
|
context="{'group_by': 'facility_id'}"/>
|
|
<filter name="group_station" string="Station"
|
|
context="{'group_by': 'work_center_id'}"/>
|
|
<filter name="group_state" string="Status"
|
|
context="{'group_by': 'state'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- ===== WINDOW ACTION ===== -->
|
|
<record id="action_fp_quality_hold" model="ir.actions.act_window">
|
|
<field name="name">Quality Holds</field>
|
|
<field name="res_model">fusion.plating.quality.hold</field>
|
|
<field name="view_mode">list,kanban,form</field>
|
|
<field name="search_view_id" ref="view_fp_quality_hold_search"/>
|
|
<field name="context">{'search_default_on_hold': 1}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
No quality holds yet
|
|
</p>
|
|
<p>
|
|
Quality holds are created when parts are pulled from
|
|
production for inspection, rework, or scrap.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|