diff --git a/fusion_plating/fusion_plating_jobs/models/fp_job.py b/fusion_plating/fusion_plating_jobs/models/fp_job.py index 9810a39b..311a0a64 100644 --- a/fusion_plating/fusion_plating_jobs/models/fp_job.py +++ b/fusion_plating/fusion_plating_jobs/models/fp_job.py @@ -576,6 +576,22 @@ class FpJob(models.Model): 'context': {'default_job_id': self.id}, } + def action_open_workspace(self): + """Open the JobWorkspace OWL client action focused on this job. + + Spec: 2026-05-22-shopfloor-tablet-redesign — Phase 1 deliverable. + Used as the smart-button entry point before the Landing kanban + (Phase 3) is shipped, and stays as a back-office shortcut after. + """ + self.ensure_one() + return { + 'type': 'ir.actions.client', + 'tag': 'fp_job_workspace', + 'name': self.display_wo_name or self.name, + 'params': {'job_id': self.id}, + 'target': 'current', + } + def action_finish_current_step(self): """Steelhead-style header button: finish whatever's currently in_progress and auto-start the next pending/ready step. If 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 8b76e959..63946950 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 @@ -20,6 +20,15 @@ + +