fix: rename ambiguous 'Work Center' / 'Work Centres' menus
Two distinct entities were both labelled 'Work Centre' (US/UK spelling
the only differentiator — confusing). Renamed by purpose, model IDs
unchanged so all 12+9 existing cross-refs keep working:
fusion.plating.work.center → 'Production Line'
Physical shop-layout grouping that owns tanks. Examples: 'Line 1 —
EN', 'Anodize Line', 'Prep Bay'. Has tank_ids (O2M),
supported_process_ids (M2M), capacity_per_day. The thing tanks live
in.
fp.work.centre → 'Routing Station'
Per-job-step routing entity (post-Sub-11 mrp.workcenter replacement).
Has 'kind' selection (wet_line / bake / mask / rack / inspect),
cost_per_hour for fp.job.step rollup, default_bath_id +
default_tank_id for release-ready validation. The thing a job step
routes through.
Conceptually a Production Line CONTAINS many Routing Stations (e.g.
'EN Line' production line has wet-line, bake, inspect routing
stations on it).
Updated:
- _description on both models
- string= on the name fields
- list/form/search view strings
- act_window names ('Production Lines' / 'Routing Stations')
- menu items in fp_menu.xml + fp_jobs_menu.xml
- doc comments in both model files explaining the distinction
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.11.2.0',
|
||||
'version': '19.0.11.3.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Core plating / metal finishing ERP: facilities, processes, tanks, baths, jobs, operators.',
|
||||
'description': """
|
||||
|
||||
@@ -7,18 +7,20 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class FpWorkCenter(models.Model):
|
||||
"""A production line or station inside a facility.
|
||||
"""A physical production line inside a facility.
|
||||
|
||||
Examples: "Line 1 - EN", "Anodize Line", "Prep Bay", "Bake Station",
|
||||
"Inspection Booth", "Shipping Dock". Work centers group tanks and
|
||||
provide scheduling capacity.
|
||||
Examples: "Line 1 — EN", "Anodize Line", "Prep Bay", "Bake Station",
|
||||
"Inspection Booth", "Shipping Dock". Production lines group tanks
|
||||
and provide daily-capacity scheduling. This is the SHOP-LAYOUT
|
||||
entity — distinct from `fp.work.centre` which is the per-job-step
|
||||
routing station with cost-per-hour rollup.
|
||||
"""
|
||||
_name = 'fusion.plating.work.center'
|
||||
_description = 'Fusion Plating — Work Center'
|
||||
_description = 'Fusion Plating — Production Line'
|
||||
_order = 'facility_id, sequence, name'
|
||||
|
||||
name = fields.Char(
|
||||
string='Work Center',
|
||||
string='Production Line',
|
||||
required=True,
|
||||
)
|
||||
code = fields.Char(
|
||||
|
||||
@@ -13,11 +13,23 @@ from odoo import fields, models
|
||||
|
||||
|
||||
class FpWorkCentre(models.Model):
|
||||
"""Routing station for a job step — replaces mrp.workcenter for
|
||||
plating after the Sub 11 MRP cutout.
|
||||
|
||||
Each routing station has a `kind` (wet_line / bake / mask / rack /
|
||||
inspect / other) that drives release-ready validation on
|
||||
`fp.job.step` (e.g. wet_line requires bath+tank to be set before
|
||||
the step can start). Costable via `cost_per_hour`.
|
||||
|
||||
Distinct from `fusion.plating.work.center` (Production Line),
|
||||
which is the physical shop-layout grouping that owns tanks.
|
||||
A Production Line typically contains many Routing Stations.
|
||||
"""
|
||||
_name = 'fp.work.centre'
|
||||
_description = 'Plating Work Centre'
|
||||
_description = 'Plating Routing Station'
|
||||
_order = 'sequence, code, name'
|
||||
|
||||
name = fields.Char(required=True)
|
||||
name = fields.Char(string='Routing Station', required=True)
|
||||
code = fields.Char(required=True, help='Short code used on stickers and reports.')
|
||||
sequence = fields.Integer(default=10)
|
||||
facility_id = fields.Many2one(
|
||||
|
||||
@@ -5,10 +5,16 @@
|
||||
"All Jobs" and "Steps" used to live under a separate "Jobs"
|
||||
submenu but the user moved them under Shop Floor instead
|
||||
(see fusion_plating_jobs/views/jobs_in_shopfloor_menu.xml).
|
||||
Only Work Centres stays in core (under Configuration). -->
|
||||
Routing Stations stays in core (under Configuration → Shop Setup).
|
||||
|
||||
Note: this is the per-step routing entity (fp.work.centre,
|
||||
post-Sub-11 mrp.workcenter replacement) — distinct from the
|
||||
shop-layout 'Production Lines' (fusion.plating.work.center)
|
||||
that group tanks. Routing Stations are kind-aware (wet_line /
|
||||
bake / mask / rack / inspect) and carry cost_per_hour. -->
|
||||
|
||||
<menuitem id="menu_fp_jobs_work_centres"
|
||||
name="Work Centres"
|
||||
name="Routing Stations"
|
||||
parent="menu_fp_config_shop_setup"
|
||||
action="action_fp_work_centre"
|
||||
sequence="25"
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
sequence="10"/>
|
||||
|
||||
<menuitem id="menu_fp_work_centers"
|
||||
name="Work Centers"
|
||||
name="Production Lines"
|
||||
parent="menu_fp_config_shop_setup"
|
||||
action="action_fp_work_center"
|
||||
sequence="20"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<field name="name">fp.work.center.list</field>
|
||||
<field name="model">fusion.plating.work.center</field>
|
||||
<field name="arch" type="xml">
|
||||
<list string="Work Centers">
|
||||
<list string="Production Lines">
|
||||
<field name="facility_id"/>
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="code"/>
|
||||
@@ -26,7 +26,7 @@
|
||||
<field name="name">fp.work.center.form</field>
|
||||
<field name="model">fusion.plating.work.center</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Work Center">
|
||||
<form string="Production Line">
|
||||
<sheet>
|
||||
<widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
|
||||
<div class="oe_title">
|
||||
@@ -70,7 +70,7 @@
|
||||
<field name="name">fp.work.center.search</field>
|
||||
<field name="model">fusion.plating.work.center</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Work Centers">
|
||||
<search string="Production Lines">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
<field name="facility_id"/>
|
||||
@@ -83,7 +83,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_fp_work_center" model="ir.actions.act_window">
|
||||
<field name="name">Work Centers</field>
|
||||
<field name="name">Production Lines</field>
|
||||
<field name="res_model">fusion.plating.work.center</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
<field name="search_view_id" ref="view_fp_work_center_search"/>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_fp_work_centre" model="ir.actions.act_window">
|
||||
<field name="name">Work Centres</field>
|
||||
<field name="name">Routing Stations</field>
|
||||
<field name="res_model">fp.work.centre</field>
|
||||
<field name="view_mode">list,form</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user