This commit is contained in:
gsinghpal
2026-05-10 10:25:12 -04:00
parent 6c6a59ceef
commit 6b7b44264a
59 changed files with 2461 additions and 324 deletions

View File

@@ -19,12 +19,23 @@
<field name="arch" type="xml">
<form string="Step Details" edit="false" create="false" delete="false">
<sheet>
<!-- Hidden helper fields used by section visibility
conditions below. Without these the empty-state
hides for Equipment / Schedule won't evaluate. -->
<field name="work_centre_id" invisible="1"/>
<field name="tank_id" invisible="1"/>
<field name="bath_id" invisible="1"/>
<field name="rack_id" invisible="1"/>
<field name="duration_expected" invisible="1"/>
<field name="duration_actual" invisible="1"/>
<field name="assigned_user_id" invisible="1"/>
<div class="oe_title">
<h1>
<field name="name" readonly="1"/>
</h1>
<div class="text-muted">
<field name="sequence" readonly="1"/> ·
Step #<field name="sequence" readonly="1"/> ·
<field name="kind" readonly="1"/> ·
<field name="state" widget="badge"
decoration-info="state == 'in_progress'"
@@ -34,17 +45,50 @@
</div>
</div>
<group>
<group string="Equipment">
<field name="work_centre_id" readonly="1"/>
<field name="tank_id" readonly="1"/>
<field name="bath_id" readonly="1"/>
<field name="rack_id" readonly="1"/>
<!-- Job context — what job is this step part of, who's
the customer, what part, how many. The single most
useful thing to surface up top so the operator
orients themselves before drilling in. -->
<group string="Job Context">
<group>
<field name="job_id" readonly="1" options="{'no_open': True}"/>
<field name="quick_look_part_catalog_id" readonly="1"
options="{'no_open': True}"
invisible="not quick_look_part_catalog_id"/>
</group>
<group string="Schedule">
<field name="duration_expected" readonly="1"/>
<field name="duration_actual" readonly="1"/>
<field name="assigned_user_id" readonly="1"/>
<group>
<field name="quick_look_partner_id" readonly="1"
options="{'no_open': True}"
invisible="not quick_look_partner_id"/>
<field name="quick_look_qty" readonly="1"
invisible="not quick_look_qty"/>
</group>
</group>
<!-- Equipment / Schedule — only render when there's
actually something to show. An Inspection step with
no tank / bath / time-budget shouldn't display
four empty rows of "—" — that's misleading. -->
<group invisible="not work_centre_id and not tank_id and not bath_id and not rack_id and not duration_expected and not duration_actual and not assigned_user_id">
<group string="Equipment"
invisible="not work_centre_id and not tank_id and not bath_id and not rack_id">
<field name="work_centre_id" readonly="1"
invisible="not work_centre_id"/>
<field name="tank_id" readonly="1"
invisible="not tank_id"/>
<field name="bath_id" readonly="1"
invisible="not bath_id"/>
<field name="rack_id" readonly="1"
invisible="not rack_id"/>
</group>
<group string="Schedule"
invisible="not duration_expected and not duration_actual and not assigned_user_id">
<field name="duration_expected" readonly="1"
invisible="not duration_expected"/>
<field name="duration_actual" readonly="1"
invisible="not duration_actual"/>
<field name="assigned_user_id" readonly="1"
invisible="not assigned_user_id"/>
</group>
</group>
@@ -57,14 +101,24 @@
<strong> Master switch off</strong> — no values will be collected at runtime for this step.
</div>
<separator string="Operator Instructions"/>
<div class="o_fp_quick_look_instructions">
<!-- Operator Instructions — hide the whole section when
the recipe author didn't write any. -->
<separator string="Operator Instructions"
invisible="not quick_look_instructions"/>
<div class="o_fp_quick_look_instructions"
invisible="not quick_look_instructions">
<field name="quick_look_instructions" nolabel="1" readonly="1"/>
</div>
<p class="text-muted small"
invisible="quick_look_instructions">
No instructions authored for this step.
</p>
<!-- Instruction images — visual reference photos /
screenshots the recipe author attached to the
node. Hidden when none. -->
<separator string="Reference Images"
invisible="not quick_look_instruction_attachment_ids"/>
<field name="quick_look_instruction_attachment_ids"
nolabel="1" readonly="1"
widget="many2many_binary"
invisible="not quick_look_instruction_attachment_ids"/>
<separator string="Measurement Prompts"/>
<field name="quick_look_prompt_ids" nolabel="1" readonly="1">

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_res_config_settings_jobs" model="ir.ui.view">
<field name="name">res.config.settings.fp.jobs</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//form" position="inside">
<app data-string="Fusion Plating Jobs" string="Fusion Plating Jobs" name="fusion_plating_jobs">
<block title="Native Job Migration" name="fp_jobs_migration">
<setting id="fp_use_native_jobs"
string="Use Native Plating Jobs"
help="When enabled, SO confirmation creates fp.job records instead of mrp.production. Phase-2 migration toggle.">
<field name="x_fc_use_native_jobs"/>
</setting>
</block>
</app>
</xpath>
</field>
</record>
</odoo>