diff --git a/fusion_plating/CLAUDE.md b/fusion_plating/CLAUDE.md index e3db1c5e..b07dc718 100644 --- a/fusion_plating/CLAUDE.md +++ b/fusion_plating/CLAUDE.md @@ -38,30 +38,48 @@ fusion_tasks/ — Local delivery dispatch (GPS, maps, driv ``` ## Menu Structure (Plating App) -The Plating app (`menu_fp_root`, seq 46) has these top-level menus: -| Seq | Menu | Module | Children | -|-----|------|--------|----------| -| 3 | KPIs | fusion_plating_kpi | KPIs, KPI History, Production/Quality/Finance dashboards | -| 5 | Sales | fusion_plating_configurator + portal | Quotations, Sale Orders, Customers, Part Catalog, Quote Requests, Portal Jobs | -| 8 | Configurator | fusion_plating_configurator | New Quote, Coating Configs, Pricing Rules, Treatments | -| 12 | Shop Floor | fusion_plating_shopfloor | Plant Overview, Tablet Station, Bake Windows, First-Piece Gates | -| 15 | Receiving | fusion_plating_receiving | All Receiving, Pending Inspection, Discrepancies | -| 18 | Operations | fusion_plating (core) | Process Recipes, Production Priorities (bridge_mrp), Batches (batch), Baths, Chemistry Logs, Tanks | -| 25 | Certificates | fusion_plating_certificates | All, CoC, Thickness Reports | -| 30 | Quality | fusion_plating_quality | Holds, NCRs, CAPAs, FAIR, Audits, Doc Control | -| 40 | Compliance | fusion_plating_compliance | Permits, Discharge, Waste, Calendar, Spills, Config | -| 45 | Safety | fusion_plating_safety | SDS, Training, Exposure, JHSC, Incidents, PPE | -| 50 | Logistics | fusion_plating_logistics + fusion_tasks | Pickups, Deliveries, Routes, CoC, POD, Field Tasks, Task Map, Task Calendar | -| 60 | Aerospace | fusion_plating_aerospace | AS9100, Nadcap, Counterfeit, Config Items, Risk | -| 65 | Nuclear | fusion_plating_nuclear | Program, ITP, 10CFR21, Pedigree, CNSC | -| 70 | CGP | fusion_plating_cgp | Registration, AI, PSA, Visitors, Goods, Shipments, Security, Access Log | -| ~~80~~ | ~~Culture~~ | ~~fusion_plating_culture~~ | ~~Values, Recognitions~~ **— RETIRED, uninstalled on entech, code kept in repo only** | -| 90 | Configuration | fusion_plating (core) + many | Facilities, Work Centres, Process Categories/Types, Bath Params, Stations, Ovens, Invoice Strategy, Account Holds, Training Types, Chemicals, Notification Templates/Log, Calibration, Specs, AVL, Value Sets/Rotations, N299 Levels, Vehicles | +> **Updated 2026-04-28** — Phase 1/2/3 menu reorg consolidated 17 top-levels down to 6 (operator-visible). Industry verticals (Safety/Aerospace/Nuclear/CGP) moved INSIDE a new Compliance hub. Configuration regrouped into 7 themed folders. See the "Phase 1 / 2 / 3 — Menu reorganization" section near the bottom of this file for the full record. -**Field Service** (`fusion_tasks`) also has its own standalone root app (seq 45) with Map View, Tasks, Calendar, Configuration. The same task actions are also accessible under Plating > Logistics. +The Plating app (`menu_fp_root`, seq 46) opens via the landing-page resolver (`action_fp_resolve_plating_landing`) — user override → company default → Sale Orders fallback. -**Key rule**: Sales menu is unified in `fusion_plating_configurator`. Portal module adds Quote Requests + Portal Jobs as children (referencing `fusion_plating_configurator.menu_fp_sales`). Do NOT create a separate Sales menu in portal. +**Top-level menus (manager view):** + +| Seq | Menu | Module(s) | Visibility | +|-----|------|-----------|------------| +| 5 | Sales & Quoting | fusion_plating_configurator + portal | estimator + supervisor | +| 8 | Configurator | fusion_plating_configurator | estimator | +| 12 | Shop Floor | fusion_plating_shopfloor | operator | +| 15 | Receiving & Shipping | fusion_plating_receiving + logistics | receiving role | +| 18 | Operations | fusion_plating (core) | open (children gate per-action) | +| 30 | Quality | fusion_plating_quality + certificates | operator | +| 50 | Compliance (hub) | fusion_plating + 5 vertical modules | supervisor+ | +| 85 | KPIs | fusion_plating_kpi | supervisor+ | +| 90 | Configuration | fusion_plating + many | manager-only | + +**Children re-parented in Phase 1**: +- Operations now contains: Process Recipes, Baths, Chemistry Logs, Tanks, Racks & Fixtures, **Maintenance** (was top-level), **Move Log** (was top-level, supervisor+), **Labor History** (was top-level), Replenishment Suggestions (supervisor+). +- Quality now contains: Holds, NCRs, CAPAs, RMAs, FAIR, Audits, Doc Control, **Certificates** (was top-level). +- Compliance hub now contains: General, Safety / WHMIS, Aerospace (AS9100 / Nadcap), Nuclear (CSA N299 / CNSC), Controlled Goods (CGP). + +**Configuration's 7 themed folders** (manager-only by inheritance from `menu_fp_config`): +1. **Shop Setup** — Facilities, Production Lines (was "Work Centers"), Routing Stations (was "Work Centres"), Process Categories, Process Types, Bake Ovens, Shopfloor Stations, Vehicles +2. **Recipes & Steps** — Step Library, QC Checklist Templates, Quality Points +3. **Materials & Tanks** — Bath Parameters, Replenishment Rules, Chemicals, Rack Tags, Calibration Equipment, Calibration Events +4. **Workforce** — Operator Certifications, Shop Roles, Training Types, Quality Teams +5. **Quality & Documents** — Customer Specs, Approved Vendor List, Quality Tags / Reasons / Stages, N299 Levels, Notification Templates, Notification Log +6. **Pricing & Billing** — Invoice Strategy Defaults, Account Holds +7. **Reference Data** — Value Sets, Value Rotations + Plus **Settings** (sequence 1, sibling above the 7 folders). + +**Field Service** (`fusion_tasks`) still has its own standalone root app (seq 45). Same task actions also accessible under Plating → Receiving & Shipping. + +**Culture (seq 80)** — RETIRED, uninstalled on entech; the menu still defines itself in repo but doesn't appear on the live system. + +**Key rules**: +- Sales menu unified in `fusion_plating_configurator`. Portal adds Quote Requests + Portal Jobs as children. Do NOT create a separate Sales menu in portal. +- New top-level menus should be a LAST resort. Most new functionality belongs as a child of one of the 6 existing top-levels. Adding to Configuration goes into the right themed folder. +- When adding a new bucket folder to Configuration, define it in `fusion_plating/views/fp_menu.xml` near the top (Odoo's data loader is strictly sequential — every parent xmlid must be defined before any child references it). ## Retired / Do-Not-Install Modules @@ -890,3 +908,319 @@ The S20 walkthrough mapped 6 OWL apps (`fp_shopfloor_tablet`, `fp_plant_overview - `step_internal_full.py` — full pause/resume/skip/bake-spawn walk To re-test the whole battle suite after a future change, run each `bt_s*.py` in sequence and confirm green. + +--- + +## Sub 12a / 12b / 12c — Simple Recipe Editor + Tablet Move/Rack/Timer + Reports (shipped 2026-04-27/28) + +Three sequential sub-projects implementing Steelhead-replacement features for clients who prefer a simpler UX over the existing tree editor. All shipped on entech. + +**Spec**: [docs/superpowers/specs/2026-04-27-sub12-simple-recipe-editor-design.md](docs/superpowers/specs/2026-04-27-sub12-simple-recipe-editor-design.md) (full design) +**Steelhead screen inventory**: [docs/superpowers/specs/2026-04-27-simple-recipe-editor-steelhead-screens.md](docs/superpowers/specs/2026-04-27-simple-recipe-editor-steelhead-screens.md) (24 screens) + +### Sub 12a — Simple Recipe Editor + Step Library (versions: fusion_plating 19.0.10.0.0) + +**New models:** +- `fp.step.template` — reusable step library; tank_ids, target ranges (time/temp/voltage/viscosity), `default_kind` selection (15 kinds), input_template_ids + transition_input_ids, `_seed_default_inputs()` helper. +- `fp.step.template.input` — operation-measurement definitions (during step). 11 input_types: text, number, boolean, selection, date, signature, time_hms, time_seconds, temperature, thickness, pass_fail. +- `fp.step.template.transition.input` — compliance prompts fired on move-out. 9 input_types incl. photo, location_picker, customer_wo. compliance_tag selection (none/as9100/nadcap/cgp/nuclear). + +**Additive fields on `fusion.plating.process.node`** (zero impact on tree editor): +- `is_template` Boolean (recipe-level — appears in Import Starter dropdown). +- `source_template_id` M2O `fp.step.template` (snapshot trace; no live coupling). +- `tank_ids` M2M to `fusion.plating.tank` (via new join table `fp_node_tank_rel`). +- `material_callout`, `time_min/max_target`, `time_unit`, `temp_min/max_target`, `temp_unit`, `voltage_target`, `viscosity_target`. +- `requires_rack_assignment`, `requires_transition_form`, `default_kind`, `preferred_editor` (tree/simple/auto). + +**Additive fields on `fusion.plating.process.node.input`**: +- `kind` Selection (`step_input` / `transition_input`, default `step_input`). +- `target_min`, `target_max`, `target_unit`, `compliance_tag`. +- 9 new typed input_type values appended (existing values preserved). + +**Settings**: `res.company.x_fc_default_recipe_editor` (tree/simple). + +**OWL client action**: `fp_simple_recipe_editor` — flat 2-pane drag-drop layout. Library on right, Selected on left. HTML5 drag-drop with two distinct dataTransfer types (`application/x-fp-step` vs `application/x-fp-library`) so the drop handler knows whether to reorder or snapshot-copy. Drop-position simulator (commit `3098fcf`): green dashed reservation line snaps above/below each row based on cursor Y vs row midpoint, with ghost-preview chip showing dragged step's icon + name. 80ms transition glides between slots. + +**11 JSONRPC routes** under `/fp/simple_recipe/...`: +- `load`, `library/{list,create,write,delete}`, `step/{insert,write,remove,reorder}`, `template/{list,import}`. +- Library + template imports SNAPSHOT-COPY fields (Q4 = A locked) — editing a library template later does NOT mutate recipes already built. +- `library/delete` is soft when any node references the template via `source_template_id`. + +**Recipe form integration**: 2 header buttons (Open Tree Editor / Open Simple Editor), is_template + preferred_editor fields, new "Step Authoring" notebook page for step/operation nodes. + +**`_resolve_preferred_editor()`** + `action_open_recipe_with_preferred_editor()` — per-recipe preferred_editor wins; `auto` falls back to company default; final fallback `tree`. + +**Menu**: Plating → Configuration → Step Library (later moved to Configuration → Recipes & Steps in Phase 2). + +**post_init_hook**: backfills `kind='step_input'` on existing process.node.input rows; seeds 13–18 starter library templates from ENP-ALUM-BASIC recipe (idempotent — won't re-seed). + +**Naming gotcha**: `_seed_default_inputs` was originally underscore-prefixed which Odoo 19 rejects when called from a view button — renamed to `action_seed_default_inputs` (commit `5494684`). Public name required for any method called from XML buttons. + +### Sub 12b — Move Parts / Move Rack / Rack Parts / Stop Timer dialogs (versions: fusion_plating 19.0.10.1.0, fusion_plating_shopfloor 19.0.25.0.0) + +**Decisions adjusted from the original spec:** +- `fusion.plating.rack` already existed (wear-tracking model with `state` selection). Sub 12b adds an ORTHOGONAL `racking_state` field for the load lifecycle. The two states coexist — a rack can be wear-active AND racking-loaded simultaneously. +- `fp.labor.timer` was NOT created. Instead, the existing `fp.job.step.timelog` (used by S1/S2 battle tests) is extended with a state machine. Single source of truth for labor; preserves S1/S2 paths. +- `fp.job.step.rack_id` already existed and is reused as the "current rack on this step" pointer (no new `current_rack_id`). + +**New models:** +- `fp.rack.tag` — M2M tag registry (Rush / Hold for QC / Damaged / Customer Sample seeded by post_init_hook). +- `fp.job.step.move` — chain-of-custody log, one row per Move Parts/Rack commit. FP/MOVE/YYYY/NNNN sequence. Carries from/to step + tank, transfer_type (step/hold/scrap/rework/split/return), qty_moved, to_location, photo_evidence_id, customer_wo_count, rack_id, moved_by_user_id. +- `fp.job.step.move.input.value` — captured transition prompt values per move. Typed dispatch on input_type → correct value_text/number/boolean/date/attachment column. + +**Extended `fusion.plating.rack`**: +- `racking_state` (empty/loading/loaded/in_use/awaiting_unrack/out_of_service) — orthogonal to existing wear `state`. +- `tag_ids` M2M, `capacity_count` (soft warn), notes. +- `current_job_step_id`, `current_tank_id`, `current_part_count` (computes that walk fp.job.step.move history). + +**Extended `fp.job.step`**: +- `requires_rack_assignment`, `requires_transition_form` (related from recipe_node_id). +- `move_ids` (O2M from_step_id), `incoming_move_ids` (O2M to_step_id). +- `is_racked` (compute, stored, depends rack_id) — drives tablet rack-vs-parts greyed-button guard. +- `qty_at_step_start`, `qty_at_step_finish`. + +**Extended `fp.job`**: qty_received, qty_visual_inspection_rejects, qty_rework, special_requirements, active_timer_ids (filtered O2M), move_ids. + +**Extended `fp.job.step.timelog` with persistent state machine**: +- `state` Selection (running/paused/stopped/reconciled, default running — preserves S1/S2). +- `last_paused_at`, `total_paused_seconds`, `accrued_seconds` (compute). +- `billed_hrs/min/sec`, `billed_total_seconds`, `billed_pct` (compute). +- `product_id` (split-by-product reconciliation), `notes`. +- `job_id` (related, indexed) for fast O2M from `fp.job.active_timer_ids`. + +**12 tablet controller endpoints** in `fusion_plating_shopfloor/controllers/move_controller.py`: +- Move Parts: `/preview`, `/commit` +- Move Rack: `/preview`, `/commit` +- Rack Parts: `/commit` +- Rack picker: `/rack/list_empty`, `/rack/scan_qr` +- Persistent labor timer: `/labor_timer/{start,pause,resume,stop,reconcile}` + +**Manager-bypass context flags** (consistent with existing fp_skip_* protocol): `fp_skip_predecessor_check`, `fp_skip_rack_assignment`, `fp_skip_transition_form`. All bypasses post to chatter on the move record naming the user + which flags fired. Manager group check enforced. + +**`_safe()` wrapper**: UserError → JSONRPC-friendly `{ok: False, error: msg}` so OWL components show a flash without crashing. + +**4 OWL dialogs** (in `fusion_plating_shopfloor/static/src/js/`): +- `move_parts_dialog.js` — mirror of Steelhead screens 1-3, 14-15. System-derived top section (Part Count / From Node / To Node / Transfer Type / To Station / To Location with camera button). Compliance Prompts section renders authored transition_input_ids. Blockers section (NEW pattern, our improvement over Steelhead): each blocker has inline Resolve button. Soft (amber + button enabled) vs hard (amber + button disabled with tooltip listing reasons). MOVE button greys out when blocked. +- `move_rack_dialog.js` — atomic multi-batch move. Rack name in title, tag chips, batches list, Type + To Node + To Station picker. +- `rack_parts_dialog.js` — searchable empty-rack picker, QR Scan input, Unit + Amount fields. Save / Save+Print (the latter opens `/report/pdf/fusion_plating_reports.action_report_fp_rack_travel/` — gap closed in Sub 12c+ commit `7d3b8f1`). +- `stop_timer_dialog.js` — opens with state already at `stopped` (server flips on load), pre-fills billed_* from accrued. Cancel / Save / Save & Start New Timer (chains into a fresh timer for the same step). + +**Custom event protocol**: `fp-resolve-rack` window CustomEvent fired from Move Parts dialog when operator clicks Resolve on a rack-required blocker → tablet listens → spawns Rack Parts sub-dialog inline. Cleanup on unmount. + +**Shopfloor tablet** (`shopfloor_tablet.js`): wired Move Parts + Stop Timer button handlers; `dialog` service injected; rack-resolve event listener with cleanup on `onWillUnmount`. + +**Plant overview** (`plant_overview.js` + XML): new top "Racks" pane shows racks in (loaded/in_use/awaiting_unrack) state with tag chips, current_part_count, breadcrumb (current node + tank code), `MOVE RACK` button per row. Backend `/fp/shopfloor/plant_overview` extended to return `racks` array alongside the existing parts/batches. + +**Operator UX rule**: `fp.job.step.is_racked` drives the tablet's MOVE PARTS button grey-out. Operator MUST go through MOVE RACK when batch is racked — enforced by disabled button state, not error message. + +**post_init_hook**: seeds 4 starter rack tags (idempotent). + +**Deploy gotcha**: `to_step_id` was originally `required=True, ondelete='set null'` — Odoo 19 disallows that combination. Switched to `ondelete='restrict'` (commit `e718a47`). Audit-safety bonus: destination steps can't be unlinked while move-log rows reference them. + +### Sub 12c — Reports + Labor History screen (versions: fusion_plating 19.0.10.2.0, fusion_plating_jobs 19.0.7.0.0, fusion_plating_reports 19.0.10.0.0, fusion_plating_certificates 19.0.5.3.0) + +Re-scoped from the original 18-task plan to 5 tasks after auditing existing artifacts: `report_coc_en` / `report_coc_fr` already had Nadcap / AS9100 / CGP infrastructure built into `fusion_plating_reports`. `company.x_fc_nadcap_logo` etc. already existed. + +**Operator Traveller v2** (`fusion_plating_jobs/report/report_fp_job_traveller.xml`): +- A4 landscape paper-style (matching Amphenol screens 16-18), replaces the minimal portrait template. +- Header: company logo + Code 128 barcode + WO# + Date In + Due Date + Type + Order# + PO# + WO-Generated-By + customer block. +- Item Information: Part# / Rev / Mat / Catg / S/N + Item-Name + Qty Rec / VIS INSP / Rework / Special Requirements / Stamp-Date. +- Process-Sheet header: recipe name + category + spec/info. +- Routing table (11 cols): Step / Tank / Operation+Actuals / Instruction / Unit / Material / Voltage / Time(min) / Temp / Stamp / Date. +- Targets pulled from recipe-node fields when present (Sub 12a authored), 'N/A' otherwise. +- Defensive QWeb — every cross-module field guarded via `'X in record._fields'`. +- New paperformat `paperformat_fp_traveller_landscape`. + +**Chronological CoC body** (`fusion_plating_reports/report/report_coc_chronological.xml`): +- New `coc_body_chronological` template walks `fp.job.step.move` records ordered by `move_datetime`. +- Per-move heading ` ()` + "Moved By / Time / Qty" meta line. +- 5-column measurement sub-table (Name / Description / Target / Actual / Recorded By) when destination step has captured inputs OR move has captured `transition_input_value_ids`. +- Actual column (gap-fix commit `7d3b8f1`): builds `captured_values_by_input` dict from `mv.transition_input_value_ids`, renders typed values (text as-is, number with target unit, boolean as PASS/FAIL, datetime formatted, attachment placeholder). +- New router template `coc_body_router` picks chronological vs classic body via `fp.certificate.body_style` field. +- Both English + French CoC actions (`report_coc_en`, `report_coc_fr`) rerouted through the router. Existing certs default to `classic` so no regressions. + +**`fp.certificate.body_style`** Selection (classic/chronological), default classic. Surfaced on cert form alongside certified_by_id. + +**Per-customer cert statement (gap-fix `7d3b8f1`)**: 3-tier resolution. +- `res.partner.x_fc_cert_statement` Text (per-customer override, surfaced on partner form under Cert + Document Routing block). +- `res.company.x_fc_default_cert_statement` Text (company-level fallback). +- Hardcoded AS9100 / ISO 9001 boilerplate as final fallback. + +**Rack Travel Ticket PDF (gap-fix `7d3b8f1`)** in `fusion_plating_reports/report/report_fp_rack_travel.xml`: +- A5 landscape, 28pt rack name, Code 128 barcode of `FP-RACK:`, tag chips, contained-batches table (qty / part number / WO / customer / current step). +- Bound to `fusion.plating.rack` model — appears in the rack form's Print menu. +- Closes Sub 12b's Save+Print 404 placeholder. + +**Labor History screen** (`fusion_plating/views/fp_job_step_timelog_views.xml`): +- Plating → Operations → Labor History (sequence 64). +- List view colour-coded by state, with `billed_pct` progressbar. +- 8 search filters (My Timers default, Today, Running, Paused, Pending Reconciliation, Reconciled) + Group-by Operator/Job/Date. +- Form view: identity readonly, billed_hrs/min/sec editable for supervisors+ until `state=reconciled`. `create=false` (timers are runtime-produced via tablet). +- ACL rows for `fp.job.step.timelog`: operator (rwc, no unlink), supervisor (rwc, no unlink), manager (full). + +### Other sub-12 era ergonomics shipped in this session + +- **Tank model** (commit `cfe776b`): `code` → "Tank Number", `name` → "Tank Name". Header buttons for state transitions (Mark Empty/Filled/In Use/Draining/Maintenance/Out of Service) with chatter audit logging. +- **Plating app default landing screen** (commit `cfe776b`): `menu_fp_root.action` → `action_fp_sale_orders` (later replaced by Phase 1 resolver server action). +- **WO label** (commit `cfe776b`): SO smart-button "Plating Jobs" → "WO". +- **Drop-position simulator** in Simple Recipe Editor (commit `3098fcf`): green dashed reservation line + ghost chip showing exactly where the drop will land. Snaps above/below row midpoint based on cursor Y. 80ms transition. + +--- + +## Phase 1 / 2 / 3 — Menu reorganization (shipped 2026-04-28) + +Customer feedback: "too many top-level menus" + "configuration is unorganized". Three-phase reshuffle reduces 17 top-levels to 6 (operator-visible), groups the flat 36-entry Configuration into 7 themed folders, and tightens role-based visibility. + +### Phase 1 — Top-level consolidation + landing-page resolver (`fusion_plating` 19.0.11.0.0, commit `0ad382e`) + +**New top-level structure (manager view):** + +``` +🏭 Plating (action = landing resolver — see below) +├── 📊 KPIs [seq 85, supervisor+] +├── 💰 Sales & Quoting (Sales + Configurator) +├── 🔧 Operations [seq 18] +│ ├── Process Recipes, Baths, Chemistry Logs, Tanks, Racks +│ ├── Replenishment Suggestions [Phase 3: supervisor+] +│ ├── Maintenance [Phase 1: re-parented from top] +│ ├── Move Log [Phase 1+3: re-parented + supervisor+] +│ └── Labor History [Phase 1: re-parented from top] +├── 📦 Receiving & Shipping +├── ✅ Quality +│ └── Certificates [Phase 1: re-parented from top] +├── 📋 Compliance [seq 50, supervisor+] +│ ├── General ← was top-level Compliance +│ ├── Safety / WHMIS ← was top-level Safety +│ ├── Aerospace (AS9100 / Nadcap) ← was top-level +│ ├── Nuclear (CSA N299 / CNSC) ← was top-level +│ └── Controlled Goods (CGP) ← was top-level +└── ⚙ Configuration [seq 90, manager-only] +``` + +**Re-parented (no XML id changes — bookmarks still work):** +- `fusion_plating_compliance.menu_fp_compliance_root` → `menu_fp_compliance_hub` (renamed 'General') +- `fusion_plating_safety.menu_fp_safety_root` → `menu_fp_compliance_hub` (renamed 'Safety / WHMIS') +- `fusion_plating_aerospace.menu_fp_aerospace` → `menu_fp_compliance_hub` (renamed 'Aerospace (AS9100 / Nadcap)') +- `fusion_plating_nuclear.menu_fp_nuclear` → `menu_fp_compliance_hub` (renamed 'Nuclear (CSA N299 / CNSC)') +- `fusion_plating_cgp.menu_fp_cgp` → `menu_fp_compliance_hub` (renamed 'Controlled Goods (CGP)') +- `fusion_plating_certificates.menu_fp_certificates` → `fusion_plating_quality.menu_fp_quality` +- `fusion_plating_bridge_maintenance.menu_fp_maintenance` → `fusion_plating.menu_fp_operations` +- `fusion_plating.menu_fp_job_step_move` (Move Log) → `menu_fp_operations` +- `fusion_plating.menu_fp_job_step_timelog` (Labor History) → `menu_fp_operations` + +**Landing-page resolver** (`fusion_plating/data/fp_landing_data.xml`): +- `ir.actions.server` named `action_fp_resolve_plating_landing`. Code in the action: user override → company default → Sale Orders fallback. +- `menu_fp_root` rewired to call this server action. +- New fields: + - `ir.actions.act_window.x_fc_pickable_landing` — Boolean tag for curated picklist. + - `res.company.x_fc_default_landing_action_id` — admin sets fallback. + - `res.users.x_fc_plating_landing_action_id` — per-user override. +- UI surfaces in `fusion_plating/views/fp_landing_views.xml`: + - User Profile / Preferences → Fusion Plating tab (per-user dropdown). + - Settings → Fusion Plating → Plating Landing Page block (company default). +- `fusion_plating_configurator`'s earlier menu_fp_root override (action_fp_sale_orders direct) was removed — core's resolver now owns the routing. +- Pickable list is curated via inline `` on action records — currently flagged: `action_fp_sale_orders`, `action_fp_quotations`, `action_fp_process_recipe`. Add more by tagging the relevant act_window record at its source. + +### Phase 2 — Configuration sub-folder grouping (`fusion_plating` 19.0.11.1.0, commits `3641b78` + `62c1315` + `4671541`) + +**7 themed folders + Settings sibling:** + +``` +⚙ Configuration [manager-only] +├── ⚡ Settings (sequence 1, sibling) +├── 🏢 Shop Setup (10) +│ ├── Facilities, Production Lines, Routing Stations, +│ ├── Process Categories, Process Types, +│ └── Bake Ovens, Shopfloor Stations, Vehicles +├── 📜 Recipes & Steps (20) +│ └── Step Library, QC Checklist Templates, Quality Points +├── 🧪 Materials & Tanks (30) +│ ├── Bath Parameters, Replenishment Rules, Chemicals, +│ └── Rack Tags, Calibration Equipment, Calibration Events +├── 👥 Workforce (40) +│ └── Operator Certifications, Shop Roles, Training Types, Quality Teams +├── 📝 Quality & Documents (50) +│ ├── Customer Specs, Approved Vendor List, +│ ├── Quality Tags, Quality Reasons, Quality Stages, N299 Levels, +│ └── Notification Templates, Notification Log +├── 💵 Pricing & Billing (60) +│ └── Invoice Strategy Defaults, Account Holds +└── 🔁 Reference Data (70) + └── Value Sets, Value Rotations +``` + +**The 7 bucket folders are defined in `fusion_plating/views/fp_menu.xml`**. Touched 11 module XML files to re-parent existing children: +- `fusion_plating_invoicing` → Pricing & Billing +- `fusion_plating_notifications` → Quality & Documents +- `fusion_plating_safety` → Workforce + Materials & Tanks +- `fusion_plating_shopfloor` → Shop Setup +- `fusion_plating_logistics` → Shop Setup (Vehicles) +- `fusion_plating_culture` → Reference Data +- `fusion_plating_nuclear` → Quality & Documents (N299 Levels) +- `fusion_plating_quality` → Materials & Tanks (Calibration), Quality & Documents (Specs/AVL/Tags/Reasons/Stages), Workforce (Quality Teams), Recipes & Steps (Quality Points + QC Templates) + +**Critical load-order rule (caught by entech upgrade `62c1315` + `4671541`):** +- Every parent menuitem MUST be defined before any child references it by xmlid. Odoo's data loader is strictly sequential — within a single XML file AND across the manifest's `data` list. +- `fp_menu.xml` was reorganized so its declaration order is: Root → Configuration + 7 buckets → Compliance hub → Operations parent → all children. +- The manifest's `data` list was reordered to load `views/fp_menu.xml` BEFORE any view file that references the bucket xmlids (e.g. `fp_rack_tag_views.xml`, downstream module views). +- Lesson for future menu reshuffles: when adding a new bucket folder, define it in `fp_menu.xml` near the top, AND make sure that file loads early in the manifest data list. + +### Phase 3 — Tightened group-gating (`fusion_plating` 19.0.11.2.0, `fusion_plating_kpi` 19.0.1.1.0, commit `5f6c7af`) + +**Three targeted gates so operators no longer see admin/audit views:** +- `menu_fp_dashboard` (KPIs) → `groups="fusion_plating.group_fusion_plating_supervisor"`. Operators don't need dashboards. +- `menu_fp_job_step_move` (Move Log) → supervisor+. Operators see their own moves on the tablet; this top-level menu is the audit-of-everyone-else view. +- `menu_fp_replenishment_suggestions` → supervisor+. Purchasing decision, not operator concern. + +**Net effect by role:** + +| Top-level | Operator | Supervisor | Manager | +|---|:-:|:-:|:-:| +| Sales / Configurator | — | ✓ (if estimator) | ✓ | +| Shop Floor | ✓ | ✓ | ✓ | +| Operations | ✓ | ✓ | ✓ | +| Receiving & Shipping | ✓ (if receiving) | ✓ | ✓ | +| Quality | ✓ | ✓ | ✓ | +| KPIs | — | ✓ | ✓ | +| Compliance (hub) | — | ✓ | ✓ | +| Configuration | — | — | ✓ | + +Operator now sees ~5 top-level menus instead of the previous ~10. + +### Production Line / Routing Station rename (commit `afcd128`, `fusion_plating` 19.0.11.3.0) + +Two distinct entities were both labelled "Work Centre" / "Work Centers" — only the US/UK spelling differentiated them. Renamed by purpose: + +| Model | Old display | New display | What it is | +|---|---|---|---| +| `fusion.plating.work.center` | Work Centers | **Production Lines** | Physical shop-layout grouping that owns tanks. Has `tank_ids`, `supported_process_ids`, `capacity_per_day`. | +| `fp.work.centre` | Work Centres | **Routing Stations** | Per-job-step routing entity (post-Sub-11 mrp.workcenter replacement). Has `kind` (wet_line/bake/mask/rack/inspect), `cost_per_hour`, `default_bath_id`, `default_tank_id`. | + +Conceptually a Production Line CONTAINS many Routing Stations. + +Model IDs unchanged (12 + 9 cross-refs preserved). Updated: `_description` on both models, `string=` on name fields, list/form/search view strings, act_window names, menu items, doc comments. + +--- + +## Naming convention recap (Plating menu hierarchy as of 2026-04-28) + +When adding a new menu, default to one of these 6 top-level homes: +- **Sales & Quoting** — quote/order workflows, customers, parts catalog +- **Operations** — recipes, baths, tanks, racks, jobs, move log, labor, maintenance +- **Receiving & Shipping** — inbound/outbound logistics +- **Quality** — holds, NCRs, CAPAs, certificates, FAIR, audits, doc control +- **Compliance** (hub) — General / Safety / Aerospace / Nuclear / CGP +- **Configuration** (manager-only) — Settings + 7 themed folders + +Avoid creating a new TOP-LEVEL menu under `menu_fp_root` unless it's a genuinely new domain. Most new functionality belongs as a child of an existing top-level. + +When adding a new admin config, drop it into the right Configuration folder: +- Equipment / physical infrastructure → Shop Setup +- Recipe authoring → Recipes & Steps +- Chemicals, baths, calibration → Materials & Tanks +- People, roles, training → Workforce +- Specs, vendors, quality categorisation, customer notifications → Quality & Documents +- Pricing rules, account holds → Pricing & Billing +- Generic value lists → Reference Data + +Don't add new top-level Configuration entries (siblings of the 7 folders) unless absolutely necessary — Settings is the only one allowed.