feat(jobs): add fp.job.step.timelog for granular timer tracking

Each button_start opens a fresh timelog row; button_finish closes
the open row and recomputes step.duration_actual as the sum of all
interval durations. Replicates Odoo MRP's mrp.workorder.time_ids
granularity natively (no mrp dep).

Schema: step_id (M2O cascade), user_id, date_started,
date_finished, duration_minutes (computed, stored).

ACLs: operator get create permission on timelogs because
button_start creates them.

Tests: test_start_creates_timelog (asserts the log row exists,
date_finished is False, user_id is the current user) and
test_finish_closes_timelog (asserts log gets date_finished, has a
non-negative duration, and step.duration_actual matches).

Manifest 19.0.8.5.1 -> 19.0.8.6.0.

Part of: native job model migration (spec 2026-04-25)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-24 22:27:26 -04:00
parent 57a3aea16f
commit 28892f56b5
6 changed files with 103 additions and 6 deletions

View File

@@ -53,3 +53,5 @@ access_fp_job_manager,fp.job.manager,model_fp_job,fusion_plating.group_fusion_pl
access_fp_job_step_operator,fp.job.step.operator,model_fp_job_step,fusion_plating.group_fusion_plating_operator,1,1,0,0
access_fp_job_step_supervisor,fp.job.step.supervisor,model_fp_job_step,fusion_plating.group_fusion_plating_supervisor,1,1,1,0
access_fp_job_step_manager,fp.job.step.manager,model_fp_job_step,fusion_plating.group_fusion_plating_manager,1,1,1,1
access_fp_job_step_timelog_operator,fp.job.step.timelog.operator,model_fp_job_step_timelog,fusion_plating.group_fusion_plating_operator,1,1,1,0
access_fp_job_step_timelog_manager,fp.job.step.timelog.manager,model_fp_job_step_timelog,fusion_plating.group_fusion_plating_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
53 access_fp_job_step_operator fp.job.step.operator model_fp_job_step fusion_plating.group_fusion_plating_operator 1 1 0 0
54 access_fp_job_step_supervisor fp.job.step.supervisor model_fp_job_step fusion_plating.group_fusion_plating_supervisor 1 1 1 0
55 access_fp_job_step_manager fp.job.step.manager model_fp_job_step fusion_plating.group_fusion_plating_manager 1 1 1 1
56 access_fp_job_step_timelog_operator fp.job.step.timelog.operator model_fp_job_step_timelog fusion_plating.group_fusion_plating_operator 1 1 1 0
57 access_fp_job_step_timelog_manager fp.job.step.timelog.manager model_fp_job_step_timelog fusion_plating.group_fusion_plating_manager 1 1 1 1