Files
Odoo-Modules/fusion_plating/fusion_plating/views/fp_step_kind_views.xml
gsinghpal 7b90f210b9 feat(fusion_plating): kind.area_kind drives Shop Floor column routing
Add required area_kind Selection to fp.step.kind so each kind
self-declares which plant-view column its steps belong in. Replaces
the hardcoded _STEP_KIND_TO_AREA dict (removed in fp_job_step.py
in the follow-up commit).

- New `blast` kind for the Blasting column (sequence=35)
- 26 existing kind records seeded with area_kind in XML
- Pre-migrate 19.0.21.2.0 seeds existing rows BEFORE NOT NULL hits
  the schema; also activates derack/demask/gating that were
  deactivated in 19.0.20.6.0 but are needed for the full taxonomy
- Step Kind form + list views surface area_kind (badge + chip)
- Step Kind search adds Group By Shop Floor Column
- Simple Editor kind picker shows "Masking — Masking column"
  suffix so authors see the routing at pick time
- Add Hot Water Porosity Test (A-15) + Final Inspection / Packaging
  templates (used by 7+3 recipe nodes that previously had no
  library entry)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:02:02 -04:00

136 lines
5.9 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.
Sub 14b — User-extensible Step Kind catalog. Replaces the hardcoded
`default_kind` Selection on fp.step.template / fusion.plating.process.node.
-->
<odoo>
<record id="view_fp_step_kind_list" model="ir.ui.view">
<field name="name">fp.step.kind.list</field>
<field name="model">fp.step.kind</field>
<field name="arch" type="xml">
<list string="Step Kinds">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="code"/>
<field name="area_kind" decoration-info="True"/>
<field name="icon"/>
<field name="template_count"/>
<field name="active" widget="boolean_toggle"/>
</list>
</field>
</record>
<record id="view_fp_step_kind_form" model="ir.ui.view">
<field name="name">fp.step.kind.form</field>
<field name="model">fp.step.kind</field>
<field name="arch" type="xml">
<form string="Step Kind">
<header>
<button name="action_open_templates" type="object"
string="View Templates" class="btn-secondary"
invisible="template_count == 0"/>
</header>
<sheet>
<widget name="web_ribbon" title="Archived"
bg_color="bg-danger"
invisible="active"/>
<div class="oe_title">
<label for="name"/>
<h1><field name="name" placeholder="e.g. Passivation"/></h1>
<div class="text-muted">
<field name="code" placeholder="passivation"/>
</div>
</div>
<group>
<group>
<field name="area_kind" widget="badge"
help="Cards whose active step uses this kind appear in this column on the Shop Floor plant kanban."/>
<field name="sequence"/>
<field name="company_id"
groups="base.group_multi_company"/>
<field name="active" invisible="1"/>
</group>
<group>
<field name="template_count"/>
</group>
</group>
<h3 class="mt-3 mb-2">Icon</h3>
<field name="icon" widget="fp_icon_picker" nolabel="1"/>
<notebook>
<page string="Default Inputs" name="defaults">
<div class="alert alert-info" role="alert">
These inputs auto-seed onto a Step Template when an
author picks this kind and clicks "Seed Default Inputs".
Idempotent — won't duplicate prompts that already exist.
</div>
<field name="default_input_ids">
<list editable="bottom">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="input_type"/>
<field name="target_unit"/>
<field name="required" widget="boolean_toggle"/>
<field name="hint"/>
<field name="selection_options"/>
</list>
</field>
</page>
<page string="Description" name="description">
<field name="description"
placeholder="Optional ops note shown to recipe authors when they pick this kind."/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="view_fp_step_kind_search" model="ir.ui.view">
<field name="name">fp.step.kind.search</field>
<field name="model">fp.step.kind</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="code"/>
<field name="area_kind"/>
<separator/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<group>
<filter string="Shop Floor Column" name="group_area_kind"
context="{'group_by': 'area_kind'}"/>
</group>
</search>
</field>
</record>
<record id="action_fp_step_kind" model="ir.actions.act_window">
<field name="name">Step Kinds</field>
<field name="res_model">fp.step.kind</field>
<field name="view_mode">list,form</field>
<field name="search_view_id" ref="view_fp_step_kind_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new Step Kind
</p>
<p>
Step Kinds drive the dropdown shown when a recipe author
picks the type of a step (Cleaning, Plating, Bake…). Each
kind can carry default inputs that get auto-seeded onto
templates.
</p>
</field>
</record>
<menuitem id="menu_fp_step_kind"
name="Step Kinds"
parent="menu_fp_config_recipes_steps"
action="action_fp_step_kind"
sequence="50"/>
</odoo>