fix(certs): auto-edit first row in Issue Certs wizard so upload is visible
Previous attempt (e5928b96) used CSS to force the binary widget's
"Upload your file" button visible in display mode. Problem: it
rendered a non-clickable stub in every row, then DUPLICATED when
the operator clicked into edit mode (two upload links stacked).
Drop the SCSS hack entirely. Replace with a custom form-view
controller that auto-edits the first incomplete row on mount.
When the wizard opens, the JS:
1. Scopes itself via the form's o_fp_cert_issue_wizard_form class
(no-ops on every other form view in the system).
2. Finds rows where the is_ready toggle is False.
3. Clicks the fischer_file cell of the first such row.
4. The row enters edit mode → Odoo's native binary widget renders
its upload button → operator drops the file → onchange fires
→ readings parse.
Wired via js_class="fp_cert_issue_wizard_form" on the form root.
Banner copy updated to "Click a row, then click Upload your file in
the Fischerscope column" so even if the auto-edit fails for some
DOM reason, the operator knows the click path.
Module: fusion_plating_jobs 19.0.10.16.1 → 19.0.10.16.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,9 @@
|
||||
<field name="name">fp.cert.issue.wizard.form</field>
|
||||
<field name="model">fp.cert.issue.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Issue Certs">
|
||||
<form string="Issue Certs"
|
||||
js_class="fp_cert_issue_wizard_form"
|
||||
class="o_fp_cert_issue_wizard_form">
|
||||
<sheet>
|
||||
<div class="oe_title">
|
||||
<h2>
|
||||
@@ -19,10 +21,12 @@
|
||||
</div>
|
||||
<div class="alert alert-info" role="alert"
|
||||
invisible="not has_blocking_lines">
|
||||
<i class="fa fa-info-circle"/>
|
||||
<i class="fa fa-info-circle me-1"/>
|
||||
At least one cert still needs thickness data
|
||||
(Fischerscope file or readings). Fill it in
|
||||
below before confirming.
|
||||
(Fischerscope file or readings).
|
||||
<strong>Click a row, then click
|
||||
<em>Upload your file</em> in the Fischerscope
|
||||
column.</strong>
|
||||
</div>
|
||||
<!-- 2026-05-20: surface the file upload INLINE in the
|
||||
list instead of behind a row-click into a sub-form.
|
||||
|
||||
Reference in New Issue
Block a user