changes
This commit is contained in:
@@ -31,6 +31,12 @@
|
||||
action="action_fp_capa"
|
||||
sequence="20"/>
|
||||
|
||||
<menuitem id="menu_fp_quality_rma"
|
||||
name="RMAs"
|
||||
parent="menu_fp_quality"
|
||||
action="action_fp_rma"
|
||||
sequence="25"/>
|
||||
|
||||
<menuitem id="menu_fp_quality_fair"
|
||||
name="First Article Inspections"
|
||||
parent="menu_fp_quality"
|
||||
|
||||
@@ -86,6 +86,19 @@
|
||||
<field name="disposition"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Categorisation">
|
||||
<field name="team_id"/>
|
||||
<field name="reason_id"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="rma_id" readonly="1"
|
||||
invisible="not rma_id"/>
|
||||
</group>
|
||||
<group string="Tags">
|
||||
<field name="tag_ids" widget="many2many_tags"
|
||||
options="{'color_field': 'color'}" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Description">
|
||||
<field name="description" placeholder="What happened? Be specific."/>
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
<?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.
|
||||
|
||||
Sub 12 Phase B — back-office views for the four categorisation models
|
||||
(tag / reason / team / stage). All sit under Configuration → Quality.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<!-- ============================================ TAGS ===== -->
|
||||
<record id="view_fp_quality_tag_list" model="ir.ui.view">
|
||||
<field name="name">fp.quality.tag.list</field>
|
||||
<field name="model">fp.quality.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Quality Tags" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="color" widget="color_picker"/>
|
||||
<field name="description"/>
|
||||
<field name="active"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_fp_quality_tag" model="ir.actions.act_window">
|
||||
<field name="name">Quality Tags</field>
|
||||
<field name="res_model">fp.quality.tag</field>
|
||||
<field name="view_mode">list</field>
|
||||
</record>
|
||||
|
||||
<!-- ========================================= REASONS ===== -->
|
||||
<record id="view_fp_quality_reason_list" model="ir.ui.view">
|
||||
<field name="name">fp.quality.reason.list</field>
|
||||
<field name="model">fp.quality.reason</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Quality Reasons" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="category"/>
|
||||
<field name="description"/>
|
||||
<field name="active"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_fp_quality_reason_form" model="ir.ui.view">
|
||||
<field name="name">fp.quality.reason.form</field>
|
||||
<field name="model">fp.quality.reason</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Quality Reason">
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="category"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<field name="description"/>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_fp_quality_reason" model="ir.actions.act_window">
|
||||
<field name="name">Quality Reasons</field>
|
||||
<field name="res_model">fp.quality.reason</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<!-- =========================================== TEAMS ===== -->
|
||||
<record id="view_fp_quality_team_list" model="ir.ui.view">
|
||||
<field name="name">fp.quality.team.list</field>
|
||||
<field name="model">fp.quality.team</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Quality Teams">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="lead_user_id"/>
|
||||
<field name="escalation_user_id"/>
|
||||
<field name="active"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_fp_quality_team_form" model="ir.ui.view">
|
||||
<field name="name">fp.quality.team.form</field>
|
||||
<field name="model">fp.quality.team</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Quality Team">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1><field name="name"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="lead_user_id"/>
|
||||
<field name="escalation_user_id"/>
|
||||
<field name="color" widget="color_picker"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="sequence"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Members">
|
||||
<field name="member_ids" widget="many2many_tags" nolabel="1"/>
|
||||
</group>
|
||||
<field name="description" placeholder="Team scope, on-call rotation, etc."/>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_fp_quality_team" model="ir.actions.act_window">
|
||||
<field name="name">Quality Teams</field>
|
||||
<field name="res_model">fp.quality.team</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
<!-- ========================================== STAGES ===== -->
|
||||
<record id="view_fp_quality_alert_stage_list" model="ir.ui.view">
|
||||
<field name="name">fp.quality.alert.stage.list</field>
|
||||
<field name="model">fp.quality.alert.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Quality Stages" editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="fold"/>
|
||||
<field name="active"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_fp_quality_alert_stage" model="ir.actions.act_window">
|
||||
<field name="name">Quality Stages</field>
|
||||
<field name="res_model">fp.quality.alert.stage</field>
|
||||
<field name="view_mode">list</field>
|
||||
<field name="help" type="html">
|
||||
<p>Shared kanban-stage namespace for NCR + RMA. Codes are
|
||||
referenced by the state ↔ stage_id sync in
|
||||
fp_quality_categorisation_links.py — don't rename codes
|
||||
without checking that file.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================== CONFIG MENU ENTRIES ===== -->
|
||||
<menuitem id="menu_fp_config_quality_tag"
|
||||
name="Quality Tags"
|
||||
parent="fusion_plating.menu_fp_config"
|
||||
action="action_fp_quality_tag"
|
||||
sequence="100"/>
|
||||
<menuitem id="menu_fp_config_quality_reason"
|
||||
name="Quality Reasons"
|
||||
parent="fusion_plating.menu_fp_config"
|
||||
action="action_fp_quality_reason"
|
||||
sequence="105"/>
|
||||
<menuitem id="menu_fp_config_quality_team"
|
||||
name="Quality Teams"
|
||||
parent="fusion_plating.menu_fp_config"
|
||||
action="action_fp_quality_team"
|
||||
sequence="110"/>
|
||||
<menuitem id="menu_fp_config_quality_stage"
|
||||
name="Quality Stages"
|
||||
parent="fusion_plating.menu_fp_config"
|
||||
action="action_fp_quality_alert_stage"
|
||||
sequence="115"/>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?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.
|
||||
|
||||
Sub 12 Phase D — client action + menu for the Unified Quality Dashboard.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="action_fp_quality_dashboard" model="ir.actions.client">
|
||||
<field name="name">Quality Dashboard</field>
|
||||
<field name="tag">fp_quality_dashboard</field>
|
||||
<field name="target">current</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fp_quality_dashboard"
|
||||
name="Dashboard"
|
||||
parent="menu_fp_quality"
|
||||
action="action_fp_quality_dashboard"
|
||||
sequence="1"/>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,132 @@
|
||||
<?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.
|
||||
|
||||
Sub 12 Phase C — back-office views for fp.quality.point.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<record id="view_fp_quality_point_list" model="ir.ui.view">
|
||||
<field name="name">fp.quality.point.list</field>
|
||||
<field name="model">fp.quality.point</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Quality Points">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="trigger_type"/>
|
||||
<field name="template_id"/>
|
||||
<field name="team_id" optional="show"/>
|
||||
<field name="assignee_user_id" optional="show"/>
|
||||
<field name="spawn_count" string="Spawned"/>
|
||||
<field name="active" widget="boolean_toggle"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_quality_point_form" model="ir.ui.view">
|
||||
<field name="name">fp.quality.point.form</field>
|
||||
<field name="model">fp.quality.point</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Quality Point">
|
||||
<header>
|
||||
<button name="action_spawn_manual"
|
||||
string="Fire Manually"
|
||||
type="object"
|
||||
class="btn-primary"
|
||||
invisible="trigger_type != 'manual'"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1><field name="name" placeholder="e.g. Post-bake thickness check"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="trigger_type"/>
|
||||
<field name="template_id"/>
|
||||
<field name="assignee_user_id"/>
|
||||
<field name="team_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="active"/>
|
||||
<field name="sequence"/>
|
||||
<field name="spawn_count" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Filters">
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_ids" widget="many2many_tags"
|
||||
placeholder="All customers if empty"/>
|
||||
<field name="part_catalog_ids" widget="many2many_tags"
|
||||
placeholder="All parts if empty"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="coating_config_ids" widget="many2many_tags"
|
||||
placeholder="All coatings if empty"/>
|
||||
<field name="step_kind"
|
||||
invisible="trigger_type != 'job_step_done'"
|
||||
placeholder="Any step kind if empty"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Tags">
|
||||
<field name="tag_ids" widget="many2many_tags"
|
||||
options="{'color_field': 'color'}"/>
|
||||
</page>
|
||||
<page string="Description">
|
||||
<field name="description" nolabel="1"
|
||||
placeholder="Why this point exists, what spec it satisfies, when to retire it..."/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_quality_point_search" model="ir.ui.view">
|
||||
<field name="name">fp.quality.point.search</field>
|
||||
<field name="model">fp.quality.point</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Quality Points">
|
||||
<field name="name"/>
|
||||
<field name="template_id"/>
|
||||
<field name="partner_ids"/>
|
||||
<separator/>
|
||||
<filter string="Active" name="active_only" domain="[('active','=',True)]"/>
|
||||
<filter string="Manual Only" name="manual" domain="[('trigger_type','=','manual')]"/>
|
||||
<separator/>
|
||||
<group>
|
||||
<filter string="Trigger" name="g_trigger" context="{'group_by':'trigger_type'}"/>
|
||||
<filter string="Template" name="g_template" context="{'group_by':'template_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_quality_point" model="ir.actions.act_window">
|
||||
<field name="name">Quality Points</field>
|
||||
<field name="res_model">fp.quality.point</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_fp_quality_point_search"/>
|
||||
<field name="context">{'search_default_active_only': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">Define a Quality Point</p>
|
||||
<p>Quality points are auto-fired rules that spawn QC checks
|
||||
when receiving closes, jobs are confirmed, steps finish, jobs
|
||||
complete, or sale orders are confirmed. Use filters (customer,
|
||||
part, coating, step kind) to scope each point.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_fp_config_quality_point"
|
||||
name="Quality Points"
|
||||
parent="fusion_plating.menu_fp_config"
|
||||
action="action_fp_quality_point"
|
||||
sequence="120"/>
|
||||
|
||||
</odoo>
|
||||
@@ -0,0 +1,101 @@
|
||||
<?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.
|
||||
|
||||
Sub 12 Phase D — surface the new smart-button counts on:
|
||||
- fp.job form
|
||||
- sale.order form
|
||||
- res.partner form
|
||||
Also add the cross-creation buttons:
|
||||
- NCR form: Spawn CAPA
|
||||
- CAPA form: Verify Effectiveness
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<!-- fp.job smart-button row lives in fusion_plating_jobs because the
|
||||
button_box is added by that module (see Phase D notes — quality
|
||||
can't depend on jobs without creating a cycle). -->
|
||||
|
||||
<!-- =============================================== sale.order ===== -->
|
||||
<record id="view_sale_order_form_quality_buttons" model="ir.ui.view">
|
||||
<field name="name">sale.order.form.quality.buttons</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_fp_holds" type="object"
|
||||
class="oe_stat_button" icon="fa-hand-paper-o">
|
||||
<field name="fp_qc_hold_count" widget="statinfo" string="Holds"/>
|
||||
</button>
|
||||
<button name="action_view_fp_checks" type="object"
|
||||
class="oe_stat_button" icon="fa-check-square-o">
|
||||
<field name="fp_qc_check_count" widget="statinfo" string="Checks"/>
|
||||
</button>
|
||||
<button name="action_view_fp_ncrs_so" type="object"
|
||||
class="oe_stat_button" icon="fa-exclamation-triangle">
|
||||
<field name="fp_qc_ncr_count_so" widget="statinfo" string="NCRs"/>
|
||||
</button>
|
||||
<button name="action_view_fp_capas" type="object"
|
||||
class="oe_stat_button" icon="fa-wrench">
|
||||
<field name="fp_qc_capa_count" widget="statinfo" string="CAPAs"/>
|
||||
</button>
|
||||
<button name="action_view_fp_rmas" type="object"
|
||||
class="oe_stat_button" icon="fa-undo">
|
||||
<field name="fp_qc_rma_count" widget="statinfo" string="RMAs"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================================== res.partner ===== -->
|
||||
<record id="view_partner_form_quality_button" model="ir.ui.view">
|
||||
<field name="name">res.partner.form.quality.button</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="action_view_fp_quality_history" type="object"
|
||||
class="oe_stat_button" icon="fa-shield"
|
||||
groups="fusion_plating.group_fusion_plating_operator">
|
||||
<field name="fp_qc_quality_history_count"
|
||||
widget="statinfo" string="Quality History"/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ====================================== NCR — Spawn CAPA ===== -->
|
||||
<record id="view_fp_ncr_form_spawn_capa" model="ir.ui.view">
|
||||
<field name="name">fp.ncr.form.spawn.capa</field>
|
||||
<field name="model">fusion.plating.ncr</field>
|
||||
<field name="inherit_id" ref="view_fp_ncr_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="action_spawn_capa"
|
||||
string="Spawn CAPA"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="state not in ('disposition','closed') or severity == 'low'"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ============================ CAPA — Verify Effectiveness ===== -->
|
||||
<record id="view_fp_capa_form_verify" model="ir.ui.view">
|
||||
<field name="name">fp.capa.form.verify</field>
|
||||
<field name="model">fusion.plating.capa</field>
|
||||
<field name="inherit_id" ref="view_fp_capa_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//header" position="inside">
|
||||
<button name="action_verify_effectiveness"
|
||||
string="Schedule Effectiveness Check"
|
||||
type="object"
|
||||
class="btn-secondary"
|
||||
invisible="state not in ('verification','effective')"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
321
fusion_plating/fusion_plating_quality/views/fp_rma_views.xml
Normal file
321
fusion_plating/fusion_plating_quality/views/fp_rma_views.xml
Normal file
@@ -0,0 +1,321 @@
|
||||
<?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.
|
||||
|
||||
Sub 12 Phase A — RMA list / form / kanban / search + window action.
|
||||
-->
|
||||
<odoo>
|
||||
|
||||
<!-- ====================================================== LIST -->
|
||||
<record id="view_fp_rma_list" model="ir.ui.view">
|
||||
<field name="name">fp.rma.list</field>
|
||||
<field name="model">fusion.plating.rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="RMAs"
|
||||
decoration-muted="state in ('closed','cancelled')"
|
||||
decoration-warning="state == 'received'"
|
||||
decoration-danger="severity == 'critical'">
|
||||
<field name="name"/>
|
||||
<field name="create_date" string="Opened"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="sale_order_id"/>
|
||||
<field name="trigger_source"/>
|
||||
<field name="severity" widget="badge"
|
||||
decoration-info="severity == 'low'"
|
||||
decoration-warning="severity == 'high'"
|
||||
decoration-danger="severity == 'critical'"/>
|
||||
<field name="qty_returned"/>
|
||||
<field name="qty_received"/>
|
||||
<field name="resolution_type" optional="show"/>
|
||||
<field name="ncr_count" optional="show"/>
|
||||
<field name="hold_count" optional="show"/>
|
||||
<field name="state" widget="badge"
|
||||
decoration-info="state in ('authorised','shipped_to_us')"
|
||||
decoration-warning="state == 'received'"
|
||||
decoration-success="state in ('triaged','resolving','resolved')"
|
||||
decoration-muted="state in ('closed','cancelled')"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ====================================================== FORM -->
|
||||
<record id="view_fp_rma_form" model="ir.ui.view">
|
||||
<field name="name">fp.rma.form</field>
|
||||
<field name="model">fusion.plating.rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Return Material Authorisation">
|
||||
<header>
|
||||
<button name="action_authorise" string="Authorise" type="object"
|
||||
class="oe_highlight" invisible="state != 'draft'"/>
|
||||
<button name="action_mark_shipped_to_us" string="Mark as Shipped" type="object"
|
||||
invisible="state != 'authorised'"/>
|
||||
<button name="action_mark_received" string="Mark Received" type="object"
|
||||
invisible="state not in ('authorised','shipped_to_us')"
|
||||
help="Use only if no fp.receiving record was created automatically."/>
|
||||
<button name="action_triage_complete" string="Triage Complete" type="object"
|
||||
class="oe_highlight" invisible="state != 'received'"/>
|
||||
<button name="action_start_resolving" string="Start Resolving" type="object"
|
||||
invisible="state != 'triaged'"/>
|
||||
<button name="action_resolve" string="Resolve" type="object"
|
||||
class="oe_highlight" invisible="state not in ('triaged','resolving')"/>
|
||||
<button name="action_close" string="Close" type="object"
|
||||
invisible="state != 'resolved'"/>
|
||||
<button name="action_cancel" string="Cancel" type="object"
|
||||
confirm="Cancel this RMA? Manager only."
|
||||
invisible="state in ('closed','cancelled')"
|
||||
groups="fusion_plating.group_fusion_plating_manager"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,authorised,shipped_to_us,received,triaged,resolving,resolved,closed"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_button_box" name="button_box">
|
||||
<button name="action_view_sale_order" type="object"
|
||||
class="oe_stat_button" icon="fa-shopping-cart"
|
||||
invisible="not sale_order_id">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Sale Order</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_inbound_receiving" type="object"
|
||||
class="oe_stat_button" icon="fa-truck"
|
||||
invisible="not inbound_receiving_id">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Inbound</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_ncrs" type="object"
|
||||
class="oe_stat_button" icon="fa-exclamation-triangle">
|
||||
<field name="ncr_count" widget="statinfo" string="NCRs"/>
|
||||
</button>
|
||||
<button name="action_view_holds" type="object"
|
||||
class="oe_stat_button" icon="fa-hand-paper-o">
|
||||
<field name="hold_count" widget="statinfo" string="Holds"/>
|
||||
</button>
|
||||
<button name="action_view_capas" type="object"
|
||||
class="oe_stat_button" icon="fa-wrench">
|
||||
<field name="capa_count" widget="statinfo" string="CAPAs"/>
|
||||
</button>
|
||||
<button name="action_view_replacement_job" type="object"
|
||||
class="oe_stat_button" icon="fa-cogs"
|
||||
invisible="not replacement_job_id">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Replacement Job</span>
|
||||
</div>
|
||||
</button>
|
||||
<button name="action_view_refund" type="object"
|
||||
class="oe_stat_button" icon="fa-money"
|
||||
invisible="not refund_invoice_id">
|
||||
<div class="o_stat_info">
|
||||
<span class="o_stat_text">Credit Note</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name"/>
|
||||
<h1><field name="name" readonly="1"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_id" options="{'no_create': True}"/>
|
||||
<field name="sale_order_id" options="{'no_create': True}"/>
|
||||
<field name="sale_order_line_ids" widget="many2many_tags"
|
||||
options="{'no_create': True}"/>
|
||||
<field name="trigger_source"/>
|
||||
<field name="severity" widget="badge"
|
||||
decoration-info="severity == 'low'"
|
||||
decoration-warning="severity == 'high'"
|
||||
decoration-danger="severity == 'critical'"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="qty_returned"/>
|
||||
<field name="qty_received"/>
|
||||
<field name="customer_tracking"/>
|
||||
<field name="our_tracking"/>
|
||||
<field name="carrier_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Categorisation">
|
||||
<field name="team_id"/>
|
||||
<field name="reason_id"/>
|
||||
<field name="stage_id" readonly="1"/>
|
||||
</group>
|
||||
<group string="Tags">
|
||||
<field name="tag_ids" widget="many2many_tags"
|
||||
options="{'color_field': 'color'}" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Auto-Spawn (manager-overridable)"
|
||||
groups="fusion_plating.group_fusion_plating_supervisor">
|
||||
<group>
|
||||
<field name="auto_spawn_ncr"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="auto_spawn_hold"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Customer Complaint">
|
||||
<field name="complaint_description"
|
||||
placeholder="What did the customer report?"/>
|
||||
</page>
|
||||
<page string="Triage Findings"
|
||||
invisible="state in ('draft','authorised','shipped_to_us')">
|
||||
<field name="triage_findings"
|
||||
placeholder="What we found on inspection."/>
|
||||
</page>
|
||||
<page string="Resolution"
|
||||
invisible="state in ('draft','authorised','shipped_to_us','received')">
|
||||
<group>
|
||||
<group>
|
||||
<field name="resolution_type"/>
|
||||
<field name="replacement_job_id"
|
||||
invisible="resolution_type not in ('replace','rework')"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="refund_invoice_id"
|
||||
invisible="resolution_type != 'refund'"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="resolution_notes" placeholder="Notes on the chosen resolution path."/>
|
||||
</page>
|
||||
<page string="Linked NCRs"
|
||||
invisible="not linked_ncr_ids">
|
||||
<field name="linked_ncr_ids" readonly="1">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="severity" widget="badge"/>
|
||||
<field name="state" widget="badge"/>
|
||||
<field name="capa_count"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Linked Holds"
|
||||
invisible="not linked_hold_ids">
|
||||
<field name="linked_hold_ids" readonly="1">
|
||||
<list>
|
||||
<field name="name"/>
|
||||
<field name="part_ref"/>
|
||||
<field name="qty_on_hold"/>
|
||||
<field name="hold_reason"/>
|
||||
<field name="state" widget="badge"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="QR Code">
|
||||
<group>
|
||||
<field name="qr_code" widget="image"
|
||||
options="{'size': [200, 200]}"
|
||||
nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ====================================================== KANBAN -->
|
||||
<record id="view_fp_rma_kanban" model="ir.ui.view">
|
||||
<field name="name">fp.rma.kanban</field>
|
||||
<field name="model">fusion.plating.rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="state" class="o_fp_rma_kanban">
|
||||
<field name="id"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="severity"/>
|
||||
<field name="resolution_type"/>
|
||||
<field name="qty_returned"/>
|
||||
<field name="ncr_count"/>
|
||||
<field name="hold_count"/>
|
||||
<templates>
|
||||
<t t-name="card">
|
||||
<div class="o_fp_card o_fp_rma_card"
|
||||
t-att-data-severity="record.severity.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_severity_pill"
|
||||
t-att-data-severity="record.severity.raw_value">
|
||||
<field name="severity"/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="small mt-1">
|
||||
<i class="fa fa-user me-1"/><field name="partner_id"/>
|
||||
</div>
|
||||
<div class="small text-muted mt-1"
|
||||
t-if="record.resolution_type.raw_value">
|
||||
<i class="fa fa-wrench me-1"/><field name="resolution_type"/>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between mt-2 small">
|
||||
<span class="text-muted">Returned</span>
|
||||
<span class="fw-bold"><field name="qty_returned"/></span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between small">
|
||||
<span class="text-muted">NCRs / Holds</span>
|
||||
<span class="fw-bold">
|
||||
<field name="ncr_count"/> /
|
||||
<field name="hold_count"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ====================================================== SEARCH -->
|
||||
<record id="view_fp_rma_search" model="ir.ui.view">
|
||||
<field name="name">fp.rma.search</field>
|
||||
<field name="model">fusion.plating.rma</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="RMAs">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="sale_order_id"/>
|
||||
<separator/>
|
||||
<filter string="Open" name="open"
|
||||
domain="[('state','in',['draft','authorised','shipped_to_us','received','triaged','resolving'])]"/>
|
||||
<filter string="Closed" name="closed"
|
||||
domain="[('state','=','closed')]"/>
|
||||
<filter string="Critical" name="critical"
|
||||
domain="[('severity','=','critical')]"/>
|
||||
<filter string="Awaiting Receipt" name="awaiting_receipt"
|
||||
domain="[('state','in',['authorised','shipped_to_us'])]"/>
|
||||
<filter string="Awaiting Triage" name="awaiting_triage"
|
||||
domain="[('state','=','received')]"/>
|
||||
<separator/>
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
<group>
|
||||
<filter string="Status" name="g_state" context="{'group_by':'state'}"/>
|
||||
<filter string="Customer" name="g_partner" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Trigger" name="g_trigger" context="{'group_by':'trigger_source'}"/>
|
||||
<filter string="Resolution" name="g_resolution" context="{'group_by':'resolution_type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- ====================================================== ACTION -->
|
||||
<record id="action_fp_rma" model="ir.actions.act_window">
|
||||
<field name="name">RMAs</field>
|
||||
<field name="res_model">fusion.plating.rma</field>
|
||||
<field name="view_mode">kanban,list,form</field>
|
||||
<field name="search_view_id" ref="view_fp_rma_search"/>
|
||||
<field name="context">{'search_default_open': 1}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
Open the first Return Material Authorisation
|
||||
</p>
|
||||
<p>RMAs track customer returns, inspection on receipt, root-cause
|
||||
triage, and resolution (replace / rework / refund / scrap). They
|
||||
auto-spawn NCRs and Holds when the parts arrive at the shop.</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user