feat(jobs): add admin views and menu for Phase 1 models
Manager-only views during Phase 1 — operator UI rebuilt in Phase 6. Top-level menu 'Plating Jobs (new)' (seq=47) groups the three new act_window actions (Jobs, Steps Admin, Work Centres) so the foundational models can be exercised through the UI without touching the operator-facing menus that still serve mrp.production and mrp.workorder. Job form has Steps/Source/Costs notebook tabs. Step form has Equipment/Plating Spec/Audit/Instructions tabs (Audit shows the time log rows from Task 1.7). Search filters by state, priority, partner, facility. Manifest 19.0.8.6.1 → 19.0.8.7.0. Part of: native job model migration (spec 2026-04-25) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
'name': 'Fusion Plating',
|
||||
'version': '19.0.8.6.1',
|
||||
'version': '19.0.8.7.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.',
|
||||
'description': """
|
||||
@@ -96,6 +96,10 @@ Copyright (c) 2026 Nexa Systems Inc. All rights reserved.
|
||||
'views/fp_operator_certification_views.xml',
|
||||
'views/res_config_settings_views.xml',
|
||||
'views/fp_menu.xml',
|
||||
'views/fp_work_centre_views.xml',
|
||||
'views/fp_job_views.xml',
|
||||
'views/fp_job_step_views.xml',
|
||||
'views/fp_jobs_menu.xml',
|
||||
'data/fp_recipe_enp_alum_basic.xml',
|
||||
'data/fp_recipe_enp_steel_basic.xml',
|
||||
'data/fp_recipe_enp_sp.xml',
|
||||
|
||||
88
fusion_plating/fusion_plating/views/fp_job_step_views.xml
Normal file
88
fusion_plating/fusion_plating/views/fp_job_step_views.xml
Normal file
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="view_fp_job_step_form" model="ir.ui.view">
|
||||
<field name="name">fp.job.step.form</field>
|
||||
<field name="model">fp.job.step</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button name="button_start" type="object"
|
||||
string="Start" class="btn-primary"
|
||||
invisible="state not in ('ready', 'paused')"/>
|
||||
<button name="button_finish" type="object"
|
||||
string="Finish" class="btn-success"
|
||||
invisible="state != 'in_progress'"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="job_id"/>
|
||||
<field name="sequence"/>
|
||||
<field name="work_centre_id"/>
|
||||
<field name="kind"/>
|
||||
<field name="recipe_node_id"/>
|
||||
<field name="assigned_user_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="duration_expected"/>
|
||||
<field name="duration_actual" readonly="1"/>
|
||||
<field name="cost_per_hour"/>
|
||||
<field name="cost_total"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Equipment" name="equipment">
|
||||
<group>
|
||||
<field name="bath_id"/>
|
||||
<field name="tank_id"/>
|
||||
<field name="rack_id"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Plating Spec" name="spec">
|
||||
<group>
|
||||
<field name="thickness_target"/>
|
||||
<field name="thickness_uom"/>
|
||||
<field name="dwell_time_minutes"/>
|
||||
<field name="bake_setpoint_temp"/>
|
||||
<field name="bake_actual_duration"/>
|
||||
<field name="bake_chart_recorder_ref"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Audit" name="audit">
|
||||
<group>
|
||||
<field name="started_by_user_id" readonly="1"/>
|
||||
<field name="date_started" readonly="1"/>
|
||||
<field name="finished_by_user_id" readonly="1"/>
|
||||
<field name="date_finished" readonly="1"/>
|
||||
<field name="signoff_user_id" readonly="1"/>
|
||||
</group>
|
||||
<field name="time_log_ids">
|
||||
<list>
|
||||
<field name="user_id"/>
|
||||
<field name="date_started"/>
|
||||
<field name="date_finished"/>
|
||||
<field name="duration_minutes"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Instructions" name="instructions">
|
||||
<field name="instructions" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_job_step" model="ir.actions.act_window">
|
||||
<field name="name">Job Steps</field>
|
||||
<field name="res_model">fp.job.step</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
124
fusion_plating/fusion_plating/views/fp_job_views.xml
Normal file
124
fusion_plating/fusion_plating/views/fp_job_views.xml
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="view_fp_job_list" model="ir.ui.view">
|
||||
<field name="name">fp.job.list</field>
|
||||
<field name="model">fp.job</field>
|
||||
<field name="arch" type="xml">
|
||||
<list decoration-info="state=='confirmed'"
|
||||
decoration-success="state=='done'"
|
||||
decoration-muted="state=='cancelled'">
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="qty"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="state"/>
|
||||
<field name="step_progress_pct" widget="progressbar"/>
|
||||
<field name="current_location"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_job_form" model="ir.ui.view">
|
||||
<field name="name">fp.job.form</field>
|
||||
<field name="model">fp.job</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<header>
|
||||
<button name="action_confirm" type="object"
|
||||
string="Confirm" class="btn-primary"
|
||||
invisible="state != 'draft'"/>
|
||||
<button name="action_cancel" type="object"
|
||||
string="Cancel"
|
||||
invisible="state in ('done', 'cancelled')"/>
|
||||
<field name="state" widget="statusbar"
|
||||
statusbar_visible="draft,confirmed,in_progress,done"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h1><field name="name" readonly="1"/></h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="partner_id"/>
|
||||
<field name="product_id"/>
|
||||
<field name="qty"/>
|
||||
<field name="priority"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_deadline"/>
|
||||
<field name="date_planned_start"/>
|
||||
<field name="date_started" readonly="1"/>
|
||||
<field name="date_finished" readonly="1"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="manager_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Steps" name="steps">
|
||||
<field name="step_ids">
|
||||
<list editable="bottom">
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="work_centre_id"/>
|
||||
<field name="kind"/>
|
||||
<field name="state"/>
|
||||
<field name="assigned_user_id"/>
|
||||
<field name="duration_expected"/>
|
||||
<field name="duration_actual" readonly="1"/>
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Source" name="source">
|
||||
<group>
|
||||
<field name="origin"/>
|
||||
<field name="sale_order_id"/>
|
||||
<field name="recipe_id"/>
|
||||
<field name="start_at_node_id"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Costs" name="costs">
|
||||
<group>
|
||||
<field name="quoted_revenue"/>
|
||||
<field name="actual_cost"/>
|
||||
<field name="margin"/>
|
||||
<field name="margin_pct"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<chatter/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_job_search" model="ir.ui.view">
|
||||
<field name="name">fp.job.search</field>
|
||||
<field name="model">fp.job</field>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<separator/>
|
||||
<filter name="state_draft" string="Draft" domain="[('state','=','draft')]"/>
|
||||
<filter name="state_confirmed" string="Confirmed" domain="[('state','=','confirmed')]"/>
|
||||
<filter name="state_in_progress" string="In Progress" domain="[('state','=','in_progress')]"/>
|
||||
<filter name="state_done" string="Done" domain="[('state','=','done')]"/>
|
||||
<separator/>
|
||||
<filter name="rush" string="Rush" domain="[('priority','=','rush')]"/>
|
||||
<group>
|
||||
<filter name="group_state" string="Status" context="{'group_by': 'state'}"/>
|
||||
<filter name="group_partner" string="Customer" context="{'group_by': 'partner_id'}"/>
|
||||
<filter name="group_facility" string="Facility" context="{'group_by': 'facility_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_job" model="ir.actions.act_window">
|
||||
<field name="name">Plating Jobs</field>
|
||||
<field name="res_model">fp.job</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_fp_job_search"/>
|
||||
</record>
|
||||
</odoo>
|
||||
28
fusion_plating/fusion_plating/views/fp_jobs_menu.xml
Normal file
28
fusion_plating/fusion_plating/views/fp_jobs_menu.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<!-- Top-level "Plating Jobs (new)" menu, manager-only during Phase 1.
|
||||
The fully-fledged operator-facing menu structure lands in
|
||||
Phase 6 when shopfloor is rewritten. -->
|
||||
<menuitem id="menu_fp_jobs_root"
|
||||
name="Plating Jobs (new)"
|
||||
sequence="47"
|
||||
groups="fusion_plating.group_fusion_plating_manager"/>
|
||||
|
||||
<menuitem id="menu_fp_jobs_jobs"
|
||||
name="Jobs"
|
||||
parent="menu_fp_jobs_root"
|
||||
action="action_fp_job"
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem id="menu_fp_jobs_steps"
|
||||
name="Steps (Admin)"
|
||||
parent="menu_fp_jobs_root"
|
||||
action="action_fp_job_step"
|
||||
sequence="20"/>
|
||||
|
||||
<menuitem id="menu_fp_jobs_work_centres"
|
||||
name="Work Centres"
|
||||
parent="menu_fp_jobs_root"
|
||||
action="action_fp_work_centre"
|
||||
sequence="30"/>
|
||||
</odoo>
|
||||
50
fusion_plating/fusion_plating/views/fp_work_centre_views.xml
Normal file
50
fusion_plating/fusion_plating/views/fp_work_centre_views.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="view_fp_work_centre_list" model="ir.ui.view">
|
||||
<field name="name">fp.work.centre.list</field>
|
||||
<field name="model">fp.work.centre</field>
|
||||
<field name="arch" type="xml">
|
||||
<list>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="kind"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="cost_per_hour"/>
|
||||
<field name="active"/>
|
||||
</list>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_fp_work_centre_form" model="ir.ui.view">
|
||||
<field name="name">fp.work.centre.form</field>
|
||||
<field name="model">fp.work.centre</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="kind"/>
|
||||
<field name="facility_id"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="cost_per_hour"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="default_bath_id"/>
|
||||
<field name="default_tank_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_fp_work_centre" model="ir.actions.act_window">
|
||||
<field name="name">Work Centres</field>
|
||||
<field name="res_model">fp.work.centre</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user