feat(shopfloor): add Record Inputs button to Job Workspace step row
Operators trying to Finish a step with required step_input prompts got the S21 gate error telling them to 'Click Record Inputs on the step row' — but the workspace UI never exposed that button. Only the job-form view had it. Adds a 'Record Inputs' secondary button next to Finish/Finish & Sign Off when the step is active. Click opens the fp_record_inputs_dialog (via action_open_input_wizard on fp.job.step). On dialog close the workspace refreshes so the step's progress chip updates. Module version: 19.0.32.0.10 -> 19.0.32.0.11 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
{
|
||||
'name': 'Fusion Plating — Shop Floor',
|
||||
'version': '19.0.32.0.10',
|
||||
'version': '19.0.32.0.11',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Shop-floor tablet stations, QR scanning, bake window enforcer, '
|
||||
'first-piece inspection gates.',
|
||||
|
||||
@@ -153,6 +153,27 @@ export class FpJobWorkspace extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
async onRecordInputs(step) {
|
||||
// Opens the fp_record_inputs_dialog via action_open_input_wizard.
|
||||
// Lets the operator enter required step_input prompt values before
|
||||
// hitting Finish (S21 gate enforces the values be recorded).
|
||||
try {
|
||||
const result = await rpc("/web/dataset/call_kw", {
|
||||
model: "fp.job.step",
|
||||
method: "action_open_input_wizard",
|
||||
args: [[step.id]],
|
||||
kwargs: {},
|
||||
});
|
||||
if (result) {
|
||||
await this.action.doAction(result, {
|
||||
onClose: () => this.refresh(),
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
this.notification.add(err.message || "Couldn't open Record Inputs", { type: "danger" });
|
||||
}
|
||||
}
|
||||
|
||||
async onFinishStep(step) {
|
||||
if (step.requires_signoff) {
|
||||
this.dialog.add(FpSignaturePad, {
|
||||
|
||||
@@ -143,6 +143,10 @@
|
||||
<!-- Action buttons (only when unblocked) -->
|
||||
<div class="o_fp_ws_step_actions"
|
||||
t-if="isStepActive(step) and step.blocker_kind === 'none'">
|
||||
<button class="btn btn-secondary me-2"
|
||||
t-on-click="() => this.onRecordInputs(step)">
|
||||
<i class="fa fa-pencil"/> Record Inputs
|
||||
</button>
|
||||
<button t-if="step.requires_signoff"
|
||||
class="btn btn-success"
|
||||
t-on-click="() => this.onFinishStep(step)">
|
||||
|
||||
Reference in New Issue
Block a user