diff --git a/fusion_plating/fusion_plating_jobs/__manifest__.py b/fusion_plating/fusion_plating_jobs/__manifest__.py index 63807ef7..6d4609ee 100644 --- a/fusion_plating/fusion_plating_jobs/__manifest__.py +++ b/fusion_plating/fusion_plating_jobs/__manifest__.py @@ -3,7 +3,7 @@ # License OPL-1 (Odoo Proprietary License v1.0) { 'name': 'Fusion Plating — Native Jobs', - 'version': '19.0.8.14.0', + 'version': '19.0.8.14.2', 'category': 'Manufacturing/Plating', 'summary': 'Native plating job model — replaces mrp.production / mrp.workorder bridge.', 'author': 'Nexa Systems Inc.', @@ -71,8 +71,16 @@ full design rationale and §6.2 of the implementation plan for task list. 'report/report_fp_job_margin.xml', ], 'assets': { - # No bundled JS/SCSS — the canonical operator UIs live in - # fusion_plating_shopfloor (consolidated 2026-04-24). + # Sub 12d — Step Details quick-look modal styles. Registered in + # both bundles so light + dark mode each compile correctly + # ($o-webclient-color-scheme branches at compile time per + # CLAUDE.md note). + 'web.assets_backend': [ + 'fusion_plating_jobs/static/src/scss/fp_step_quick_look.scss', + ], + 'web.assets_web_dark': [ + 'fusion_plating_jobs/static/src/scss/fp_step_quick_look.scss', + ], }, 'installable': True, 'application': False, diff --git a/fusion_plating/fusion_plating_jobs/models/fp_job_step.py b/fusion_plating/fusion_plating_jobs/models/fp_job_step.py index 3039a14e..5bdd3035 100644 --- a/fusion_plating/fusion_plating_jobs/models/fp_job_step.py +++ b/fusion_plating/fusion_plating_jobs/models/fp_job_step.py @@ -933,3 +933,25 @@ class FpJobStep(models.Model): 'target': 'current', 'name': self.name, } + + def action_open_quick_look(self): + """Open the read-only Step Details quick-look modal. + + Bound to the row-button on the embedded step list — explicit + trigger needed because editable="bottom" intercepts row clicks + for inline editing rather than opening the form view. + """ + self.ensure_one() + view = self.env.ref( + 'fusion_plating_jobs.view_fp_job_step_quick_look_form' + ) + return { + 'type': 'ir.actions.act_window', + 'res_model': 'fp.job.step', + 'res_id': self.id, + 'view_mode': 'form', + 'view_id': view.id, + 'views': [(view.id, 'form')], + 'target': 'new', + 'name': self.name, + } diff --git a/fusion_plating/fusion_plating_jobs/static/src/scss/fp_step_quick_look.scss b/fusion_plating/fusion_plating_jobs/static/src/scss/fp_step_quick_look.scss new file mode 100644 index 00000000..4c962ff2 --- /dev/null +++ b/fusion_plating/fusion_plating_jobs/static/src/scss/fp_step_quick_look.scss @@ -0,0 +1,41 @@ +// Step Details Quick-Look modal — dark-mode aware tokens. +// Pattern documented in fusion-plating/CLAUDE.md: branch hex values +// at SCSS compile-time via $o-webclient-color-scheme. Don't rely on +// var(--bs-body-bg) — Odoo 19 doesn't flip it consistently across +// addons. + +$o-webclient-color-scheme: bright !default; + +$_fp_ql_panel_hex: #f8f9fa; +$_fp_ql_border_hex: #d8dadd; +$_fp_ql_text_hex: #212529; + +@if $o-webclient-color-scheme == dark { + $_fp_ql_panel_hex: #22262d !global; + $_fp_ql_border_hex: #3a3f47 !global; + $_fp_ql_text_hex: #e8eaed !global; +} + +$fp-ql-panel: var(--fp-card-bg, #{$_fp_ql_panel_hex}); +$fp-ql-border: var(--fp-border-color, #{$_fp_ql_border_hex}); +$fp-ql-text: var(--fp-text, #{$_fp_ql_text_hex}); + +// Container around the rich-text instructions inside the quick-look +// modal. Bordered + scrollable + readable in both light and dark modes. +.o_fp_quick_look_instructions { + max-height: 40vh; + overflow: auto; + padding: 12px 14px; + margin-bottom: 8px; + background: $fp-ql-panel; + color: $fp-ql-text; + border: 1px solid $fp-ql-border; + border-radius: 4px; + + // Make sure rich-text inner elements inherit the readable colour. + p, li, span, strong, em, h1, h2, h3, h4, h5, h6 { + color: inherit; + } + ul, ol { margin-bottom: 0; } + p:last-child { margin-bottom: 0; } +} diff --git a/fusion_plating/fusion_plating_jobs/views/fp_job_form_inherit.xml b/fusion_plating/fusion_plating_jobs/views/fp_job_form_inherit.xml index f0537fe3..8799164b 100644 --- a/fusion_plating/fusion_plating_jobs/views/fp_job_form_inherit.xml +++ b/fusion_plating/fusion_plating_jobs/views/fp_job_form_inherit.xml @@ -83,6 +83,10 @@ decoration-warning="state == 'paused'" decoration-muted="state in ('skipped', 'cancelled')"> +