ui(process-tree): back to Work Order + pulsing green for done steps

Two improvements to the Process Tree visualization opened from the
Work Order's Process Tree header button:

  1. Back button returns to the Work Order (job form) instead of
     Plant Overview. fp.job.action_open_process_tree now passes
     back_job_id in the client-action context; process_tree.js
     reads it via a new backJobId getter, updates the button label
     to "Back to Work Order", and routes onBack to fp.job form.
     The Plant Overview fallback stays for callers that don't pass
     either back_step_id or back_job_id.

  2. Completed operation/step cards now have a green fill (#1e8449)
     and a subtle pulsing glow (box-shadow animation, 2.6s alternate)
     so finished work pops against still-pending dark cards. Hover
     pauses the animation so the click target is steady. Reuses the
     same green the workflow-state slice already used.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-05-12 08:13:46 -04:00
parent 798458c834
commit dcbe8305d0
5 changed files with 51 additions and 4 deletions

View File

@@ -1064,7 +1064,10 @@ class FpJob(models.Model):
return {
'type': 'ir.actions.client',
'tag': 'fp_process_tree',
'context': {'job_id': self.id},
'context': {
'job_id': self.id,
'back_job_id': self.id,
},
'name': 'Process Tree — %s' % (self.name or ''),
'target': 'current',
}