# Step Details Quick-Look Modal — Design **Date:** 2026-04-30 **Module:** `fusion_plating_jobs` **Status:** Approved, implementing inline. ## Problem The job's embedded step list shows minimal columns (Name · Work Centre · State · Times · Qty · action buttons). Backend managers and supervisors viewing a job have no fast way to see what each step entails — instructions written by the office, prompts the operator will be asked, and values already recorded so far. The existing editable form view (registered for the Job Steps menu) is editable + has 4 tabs — too dense for a "what's this step about?" glance, and presents a regression risk if a manager accidentally edits state. ## Goals 1. Click a step's name in the embedded job-form list → open a read-only quick-look modal with all the manager-relevant context for that step in one scroll. 2. Preserve the existing editable form for the standalone Job Steps menu / direct navigation. 3. Zero risk of accidental edits — the modal is read-only by construction (`edit="false" create="false" delete="false"`). ## Non-Goals - Editable fields, time-logs, NCRs, predecessor status, action buttons (Start/Skip/Move). Available via "Open Full Form" link in the modal footer. - New TransientModel mirroring step fields (rejected during brainstorm — duplication). - Inline-row expansion / accordion (rejected — heavier OWL work). ## Architecture | Component | What it does | |---|---| | **Three new related/computed fields on `fp.job.step`** | `quick_look_instructions` (Html, related from `recipe_node_id.description`), `quick_look_prompt_ids` (computed Many2many → `recipe_node_id.input_ids` filtered to step_input), `quick_look_recorded_value_ids` (computed Many2many → `fp.job.step.move.input.value` rows whose `move_id.from_step_id == self.id`) | | **One new form view** `view_fp_job_step_quick_look_form` | Read-only single-sheet form. Header shows status + tank/bath/rack. Three panels: Instructions, Prompts, Recorded Values | | **One new action method** `action_open_full_form` on `fp.job.step` | Returns `ir.actions.act_window` opening the existing editable form view, replacing the modal | | **Single context attribute** on the parent job form's `` | `context="{'form_view_ref': 'fusion_plating_jobs.view_fp_job_step_quick_look_form'}"` — makes Odoo open the quick-look variant on row click | ## Form Layout Single sheet, no notebook. From top to bottom: 1. **Title row** — `name` as h1 + `state` widget="badge" 2. **Sub-header** — sequence · kind · tank · bath · rack (one line, separated by ·) 3. **Instructions panel** — Html field, `max-height: 40vh; overflow: auto`. Empty-state placeholder when blank: *"No instructions authored for this step."* 4. **Prompts panel** — read-only embedded list with columns: collect ✓/✗ (boolean_toggle, readonly), prompt name, type, target range (computed concat of `target_min–target_max`), unit, required ★ 5. **Values Recorded panel** — read-only embedded list with columns: prompt name (from `node_input_id.name`), value (computed display of typed value), recorded by, when. Sorted `create_date desc`. Empty-state: *"No values recorded yet."* 6. **Footer buttons** — `[Open Full Form]` (primary, calls action_open_full_form) · `[Close]` (special="cancel") ## Edge Cases - **No `recipe_node_id`** — instructions panel shows empty-state; prompts list empty; recorded values still resolve via move search. - **`collect_measurements=False`** — banner: *"Master switch off — no values will be collected at runtime."* Prompts list still rendered for reference. - **Multiple moves on same step (re-records)** — Values Recorded list shows all, newest first. - **Long instructions** — instruction panel scrolls so prompts/values stay visible. ## Files Touched | File | Status | Change | |---|---|---| | `fusion_plating_jobs/models/fp_job_step.py` | MOD | Add 3 fields + `action_open_full_form` method | | `fusion_plating_jobs/views/fp_job_step_quick_look_views.xml` | NEW | Read-only form view | | `fusion_plating_jobs/views/fp_job_views.xml` (or wherever step_ids is rendered) | MOD | Add `context` attr to `` | | `fusion_plating_jobs/__manifest__.py` | MOD | Register new view file, bump version | ## Effort ~150 lines, ~1 hour build + verify on entech.