chnages
This commit is contained in:
127
fusion_plating/fusion_plating/views/fp_step_kind_views.xml
Normal file
127
fusion_plating/fusion_plating/views/fp_step_kind_views.xml
Normal file
@@ -0,0 +1,127 @@
|
||||
<?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="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="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"/>
|
||||
<separator/>
|
||||
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
|
||||
</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>
|
||||
Reference in New Issue
Block a user