changes
This commit is contained in:
@@ -0,0 +1,141 @@
|
||||
<?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.
|
||||
|
||||
Admin-facing views for QC checklist templates. Manager privilege
|
||||
group required to create / edit templates.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="fp_qc_checklist_template_list" model="ir.ui.view">
|
||||
<field name="name">fp.qc.checklist.template.list</field>
|
||||
<field name="model">fp.qc.checklist.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="QC Checklist Templates" decoration-muted="not active">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="require_inspector_signoff" widget="boolean_toggle"/>
|
||||
<field name="require_thickness_readings" widget="boolean_toggle"/>
|
||||
<field name="require_thickness_report_pdf" widget="boolean_toggle"/>
|
||||
<field name="check_count"/>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="fp_qc_checklist_template_form" model="ir.ui.view">
|
||||
<field name="name">fp.qc.checklist.template.form</field>
|
||||
<field name="model">fp.qc.checklist.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="QC Template">
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_checks" type="object"
|
||||
class="oe_stat_button" icon="fa-list">
|
||||
<field name="check_count" widget="statinfo"
|
||||
string="QC Instances"/>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="Archived"
|
||||
invisible="active" bg_color="text-bg-danger"/>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" placeholder="e.g. Aerospace / Nadcap QC"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Scope">
|
||||
<field name="partner_id"
|
||||
options="{'no_create': True}"
|
||||
placeholder="Global default (leave blank)"/>
|
||||
<field name="sequence"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group string="Gate Policy">
|
||||
<field name="require_inspector_signoff"/>
|
||||
<field name="require_thickness_readings"/>
|
||||
<field name="require_thickness_report_pdf"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Checklist Items" name="items">
|
||||
<field name="line_ids">
|
||||
<list string="Items" editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="check_type"/>
|
||||
<field name="required" widget="boolean_toggle"/>
|
||||
<field name="requires_value" widget="boolean_toggle"/>
|
||||
<field name="value_min" optional="hide"/>
|
||||
<field name="value_max" optional="hide"/>
|
||||
<field name="value_uom" optional="hide"/>
|
||||
<field name="requires_photo" widget="boolean_toggle"/>
|
||||
</list>
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="check_type"/>
|
||||
<field name="sequence"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="required"/>
|
||||
<field name="requires_photo"/>
|
||||
<field name="requires_value"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Acceptance Range"
|
||||
invisible="not requires_value">
|
||||
<field name="value_min"/>
|
||||
<field name="value_max"/>
|
||||
<field name="value_uom"/>
|
||||
</group>
|
||||
<group string="Guidance">
|
||||
<field name="description" nolabel="1"
|
||||
placeholder="Inspection guidance shown to the operator on tap..."/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Notes" name="notes">
|
||||
<field name="notes" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="fp_qc_checklist_template_search" model="ir.ui.view">
|
||||
<field name="name">fp.qc.checklist.template.search</field>
|
||||
<field name="model">fp.qc.checklist.template</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<filter name="global_default" string="Global Default"
|
||||
domain="[('partner_id', '=', False)]"/>
|
||||
<filter name="per_customer" string="Per Customer"
|
||||
domain="[('partner_id', '!=', False)]"/>
|
||||
<filter name="inactive" string="Archived"
|
||||
domain="[('active', '=', False)]"/>
|
||||
<group>
|
||||
<filter name="by_customer" string="Customer"
|
||||
context="{'group_by': 'partner_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_qc_checklist_template" model="ir.actions.act_window">
|
||||
<field name="name">QC Checklist Templates</field>
|
||||
<field name="res_model">fp.qc.checklist.template</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="fp_qc_checklist_template_search"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,235 @@
|
||||
<?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="fp_quality_check_list" model="ir.ui.view">
|
||||
<field name="name">fusion.plating.quality.check.list</field>
|
||||
<field name="model">fusion.plating.quality.check</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="QC Checks"
|
||||
decoration-info="state == 'draft'"
|
||||
decoration-warning="state == 'in_progress'"
|
||||
decoration-success="state == 'passed'"
|
||||
decoration-danger="state == 'failed'"
|
||||
decoration-muted="state == 'rework'">
|
||||
<field name="name"/>
|
||||
<field name="job_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="template_id"/>
|
||||
<field name="lines_passed"/>
|
||||
<field name="lines_failed"/>
|
||||
<field name="lines_pending"/>
|
||||
<field name="line_count" optional="hide"/>
|
||||
<field name="inspector_id"/>
|
||||
<field name="completed_at"/>
|
||||
<field name="state" widget="badge"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="fp_quality_check_form" model="ir.ui.view">
|
||||
<field name="name">fusion.plating.quality.check.form</field>
|
||||
<field name="model">fusion.plating.quality.check</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Quality Check">
|
||||
<header>
|
||||
<button name="action_open_tablet" type="object"
|
||||
string="Open Mobile Checklist" class="btn-primary"
|
||||
invisible="state in ('passed', 'failed')"/>
|
||||
<button name="action_start" type="object"
|
||||
string="Start Inspection" class="btn-secondary"
|
||||
invisible="state != 'draft'"/>
|
||||
<button name="action_pass" type="object"
|
||||
string="Mark Passed" class="btn-success"
|
||||
invisible="state in ('passed', 'failed', 'draft')"/>
|
||||
<button name="action_fail" type="object"
|
||||
string="Mark Failed" class="btn-danger"
|
||||
invisible="state in ('passed', 'failed', 'draft')"
|
||||
confirm="This marks the QC as FAILED and blocks the MO from closing. Continue?"/>
|
||||
<button name="action_rework" type="object"
|
||||
string="Send to Rework" class="btn-warning"
|
||||
invisible="state in ('passed', 'failed', 'draft')"/>
|
||||
<button name="action_reset_to_draft" type="object"
|
||||
string="Reset to Draft"
|
||||
invisible="state == 'draft'"
|
||||
groups="fusion_plating.group_fusion_plating_supervisor"/>
|
||||
<button name="action_spawn_retry" type="object"
|
||||
string="Create Retry QC" class="btn-secondary"
|
||||
invisible="state != 'failed'"
|
||||
groups="fusion_plating.group_fusion_plating_supervisor"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,in_progress,passed"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_open_tablet" type="object"
|
||||
class="oe_stat_button" icon="fa-tablet">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Tablet</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<widget name="web_ribbon" title="PASSED"
|
||||
invisible="state != 'passed'" bg_color="text-bg-success"/>
|
||||
<widget name="web_ribbon" title="FAILED"
|
||||
invisible="state != 'failed'" bg_color="text-bg-danger"/>
|
||||
<widget name="web_ribbon" title="REWORK"
|
||||
invisible="state != 'rework'" bg_color="text-bg-warning"/>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" readonly="1"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group string="Job">
|
||||
<field name="job_id" readonly="1"/>
|
||||
<field name="partner_id" readonly="1"/>
|
||||
<field name="template_id"
|
||||
options="{'no_create': True}"
|
||||
readonly="state != 'draft'"/>
|
||||
</group>
|
||||
<group string="Sign-off">
|
||||
<field name="inspector_id" readonly="1"/>
|
||||
<field name="started_at" readonly="1"/>
|
||||
<field name="completed_at" readonly="1"/>
|
||||
<field name="overall_result" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Progress">
|
||||
<group>
|
||||
<field name="line_count" readonly="1"/>
|
||||
<field name="lines_passed" readonly="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="lines_failed" readonly="1"/>
|
||||
<field name="lines_pending" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Checklist" name="lines">
|
||||
<field name="line_ids">
|
||||
<list editable="bottom"
|
||||
decoration-success="result == 'pass'"
|
||||
decoration-danger="result == 'fail'"
|
||||
decoration-muted="result == 'na'">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="check_type"/>
|
||||
<field name="required" widget="boolean_toggle"/>
|
||||
<field name="requires_value" column_invisible="1"/>
|
||||
<field name="value" optional="show"
|
||||
invisible="not requires_value"/>
|
||||
<field name="value_uom" optional="hide"/>
|
||||
<field name="value_min" optional="hide"/>
|
||||
<field name="value_max" optional="hide"/>
|
||||
<field name="value_in_range" widget="boolean_toggle"
|
||||
optional="hide"/>
|
||||
<field name="requires_photo" column_invisible="1"/>
|
||||
<field name="photo_attachment_id"
|
||||
invisible="not requires_photo"
|
||||
widget="many2one_binary" optional="show"/>
|
||||
<field name="notes" optional="hide"/>
|
||||
<field name="result" widget="badge"
|
||||
decoration-success="result == 'pass'"
|
||||
decoration-danger="result == 'fail'"
|
||||
decoration-muted="result == 'na'"
|
||||
decoration-info="result == 'pending'"/>
|
||||
<button name="action_mark_pass" type="object"
|
||||
icon="fa-check" title="Pass"
|
||||
invisible="result == 'pass'"/>
|
||||
<button name="action_mark_fail" type="object"
|
||||
icon="fa-times" title="Fail"
|
||||
invisible="result == 'fail'"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Thickness Report" name="thickness">
|
||||
<group>
|
||||
<field name="thickness_report_pdf_id"
|
||||
widget="many2one_binary"
|
||||
help="Upload the Fischerscope / XDAL 600 PDF — readings will be auto-extracted."/>
|
||||
<field name="thickness_reading_count" readonly="1"/>
|
||||
<field name="require_thickness_readings" readonly="1"/>
|
||||
<field name="require_thickness_report_pdf" readonly="1"/>
|
||||
</group>
|
||||
<field name="thickness_reading_ids">
|
||||
<list editable="bottom">
|
||||
<field name="reading_number"/>
|
||||
<field name="position_label"/>
|
||||
<field name="nip_mils"/>
|
||||
<field name="ni_percent"/>
|
||||
<field name="p_percent"/>
|
||||
<field name="auto_extracted" widget="boolean_toggle"/>
|
||||
<field name="operator_id"/>
|
||||
<field name="reading_datetime"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Notes" name="notes">
|
||||
<field name="notes" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="fp_quality_check_search" model="ir.ui.view">
|
||||
<field name="name">fusion.plating.quality.check.search</field>
|
||||
<field name="model">fusion.plating.quality.check</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="job_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="inspector_id"/>
|
||||
<filter name="draft" string="Draft"
|
||||
domain="[('state', '=', 'draft')]"/>
|
||||
<filter name="in_progress" string="In Progress"
|
||||
domain="[('state', '=', 'in_progress')]"/>
|
||||
<filter name="passed" string="Passed"
|
||||
domain="[('state', '=', 'passed')]"/>
|
||||
<filter name="failed" string="Failed"
|
||||
domain="[('state', '=', 'failed')]"/>
|
||||
<filter name="rework" string="Rework"
|
||||
domain="[('state', '=', 'rework')]"/>
|
||||
<separator/>
|
||||
<filter name="my_inspections" string="My Inspections"
|
||||
domain="[('inspector_id', '=', uid)]"/>
|
||||
<group>
|
||||
<filter name="by_customer" string="Customer"
|
||||
context="{'group_by': 'partner_id'}"/>
|
||||
<filter name="by_state" string="Status"
|
||||
context="{'group_by': 'state'}"/>
|
||||
<filter name="by_template" string="Template"
|
||||
context="{'group_by': 'template_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_quality_check" model="ir.actions.act_window">
|
||||
<field name="name">Quality Checks</field>
|
||||
<field name="res_model">fusion.plating.quality.check</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="fp_quality_check_search"/>
|
||||
</record>
|
||||
|
||||
<!-- ===== Menu — add QC Checks + QC Templates under Quality ===== -->
|
||||
<menuitem id="menu_fp_quality_check"
|
||||
name="Quality Checks"
|
||||
parent="fusion_plating_quality.menu_fp_quality"
|
||||
action="action_fp_quality_check"
|
||||
sequence="7"/>
|
||||
|
||||
<menuitem id="menu_fp_config_qc_template"
|
||||
name="QC Checklist Templates"
|
||||
parent="fusion_plating.menu_fp_config"
|
||||
action="action_fp_qc_checklist_template"
|
||||
sequence="85"
|
||||
groups="fusion_plating.group_fusion_plating_manager"/>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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 res.partner with the QC requirement flag + template picker.
|
||||
Adds a "Quality Control" group to the "Plating Documents" tab that
|
||||
fusion_plating_certificates opens on the partner form.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_partner_form_fp_qc" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.fp.qc</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="fusion_plating_certificates.view_partner_form_fp_document_prefs"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='fp_document_prefs']" position="inside">
|
||||
<group string="Quality Control"
|
||||
name="fp_qc_prefs_group">
|
||||
<p class="text-muted" colspan="2">
|
||||
When QC sign-off is required, confirming a Manufacturing Order
|
||||
auto-creates a checklist from the active template. The MO
|
||||
cannot be marked Done until an inspector passes the QC.
|
||||
</p>
|
||||
<group>
|
||||
<field name="x_fc_requires_qc" widget="boolean_toggle"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="x_fc_qc_template_id"
|
||||
options="{'no_create': True}"
|
||||
invisible="not x_fc_requires_qc"/>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user