feat(jobs): Record Inputs OWL Dialog (v4) — replaces list-as-cards hack
Scrapped the v2/v3 form-view + list-as-cards CSS approach after
extensive failure to make Odoo's editable list look like cards.
Built a proper OWL Dialog component instead, mirroring the pattern
used by fusion_plating_shopfloor's move_parts_dialog.js.
What changed
============
* New OWL Dialog: fp_record_inputs_dialog.js
- Loads step + prompt definitions via /fp/record_inputs/load
- Renders each prompt as a semantic <div class="o_fp_ri_card">
- Per-row widget chosen by input_type:
numeric/temperature/thickness/time_seconds/ph -> number input
boolean/pass_fail -> custom CSS toggle (clearer than Bootstrap)
date -> datetime-local input
photo -> file picker w/ preview + clear
multi_point_thickness -> 5-cell grid + live average
bath_chemistry_panel -> pH/Conc/Temp/Bath grid
selection -> dropdown sourced from selection_options
text/signature/... -> text input
- Live in-range hint for numeric prompts
("in range" / "below target" / "above target")
- Save validates ad-hoc rows have a Prompt label
- Save dispatches the next_action returned by the wizard model
(e.g. action_finish_and_advance for the Finish & Next flow)
* New XML template: fp_record_inputs_dialog.xml
Full DOM control. No fighting Odoo's list view, no class-stripping
bugs from canUseFormatter, no read-mode-vs-edit-mode CSS dance.
* New SCSS: fp_record_inputs_dialog.scss
- Dark mode aware (compile-time @if $o-webclient-color-scheme==dark)
- Pure semantic selectors (.o_fp_ri_card, .o_fp_ri_input, etc.)
- 14 surface tokens with light/dark hex pairs
- Tablet polish via @media (max-width: 768px)
- Custom toggle widget (no <input type="checkbox"> hidden trick)
* New controller: controllers/record_inputs.py
- /fp/record_inputs/load: returns step + prompts payload
- /fp/record_inputs/commit: creates a wizard, populates lines,
calls action_commit (reuses existing audit-trail / synthetic
move semantics — no commit logic duplicated)
* fp_job_step.py wired to dispatch the new action
- _fp_open_input_wizard returns
{ type: 'ir.actions.client', tag: 'fp_record_inputs_dialog' }
- action_open_input_wizard same
- Contract-review redirect gate preserved (Sub 4 work intact)
* Manifest registers JS/XML/SCSS in BOTH backend + dark bundles
per the dark-mode pattern in CLAUDE.md.
What was kept
=============
* fp.job.step.input.wizard TransientModel — UNCHANGED. The new
controller's commit endpoint creates a wizard record and calls
action_commit() on it, so all the audit-trail / synthetic-move
/ chatter logic stays in Python where it belongs.
* v2 + v3 form views still exist in the XML file. If the OWL
dialog ever fails, switch action_open_input_wizard back to
ir.actions.act_window with view_id=v2 or v3.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
{
|
||||
'name': 'Fusion Plating — Native Jobs',
|
||||
'version': '19.0.8.16.3',
|
||||
'version': '19.0.8.17.0',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Native plating job model — replaces mrp.production / mrp.workorder bridge.',
|
||||
'author': 'Nexa Systems Inc.',
|
||||
@@ -71,18 +71,22 @@ full design rationale and §6.2 of the implementation plan for task list.
|
||||
'report/report_fp_job_margin.xml',
|
||||
],
|
||||
'assets': {
|
||||
# Sub 12d — Step Details quick-look modal styles + Sub 12e — Record
|
||||
# Inputs Wizard v3 card layout. Registered in both bundles so
|
||||
# light + dark mode each compile correctly
|
||||
# ($o-webclient-color-scheme branches at compile time per
|
||||
# CLAUDE.md note).
|
||||
# Sub 12d — Step Details quick-look modal styles
|
||||
# Sub 12e v4 — Record Inputs OWL Dialog (replaces v2/v3)
|
||||
# Both 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',
|
||||
'fusion_plating_jobs/static/src/scss/fp_job_step_input_wizard_v3.scss',
|
||||
'fusion_plating_jobs/static/src/scss/fp_record_inputs_dialog.scss',
|
||||
'fusion_plating_jobs/static/src/js/fp_record_inputs_dialog.js',
|
||||
'fusion_plating_jobs/static/src/xml/fp_record_inputs_dialog.xml',
|
||||
],
|
||||
'web.assets_web_dark': [
|
||||
'fusion_plating_jobs/static/src/scss/fp_step_quick_look.scss',
|
||||
'fusion_plating_jobs/static/src/scss/fp_job_step_input_wizard_v3.scss',
|
||||
'fusion_plating_jobs/static/src/scss/fp_record_inputs_dialog.scss',
|
||||
'fusion_plating_jobs/static/src/js/fp_record_inputs_dialog.js',
|
||||
'fusion_plating_jobs/static/src/xml/fp_record_inputs_dialog.xml',
|
||||
],
|
||||
},
|
||||
'installable': True,
|
||||
|
||||
Reference in New Issue
Block a user