fix(jobs): auto-resync step.duration_actual on timelog edits
When a supervisor edits a timelog's date_started/date_finished (or deletes a stale timelog), the parent step's "Actual Min" column was showing stale data — duration_actual is a regular Float set once by button_finish. Adds: - fp.job.step._fp_resum_duration_actual: quiet helper that re-sums duration_actual from time_log_ids.duration_minutes. Skip no-op updates so write traffic is minimised. - fp.job.step.timelog.create/write/unlink hooks: call the helper on the affected parent step(s) so duration_actual stays consistent. Write hook only fires when date_started/date_finished/ step_id changed (notes edits skip resync). step_id reassignment resyncs both old and new parent. - Existing action_recompute_duration_from_timelogs (manual button) still posts a chatter entry for audit-trail use cases. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
# License OPL-1 (Odoo Proprietary License v1.0)
|
||||
{
|
||||
'name': 'Fusion Plating — Native Jobs',
|
||||
'version': '19.0.8.20.1',
|
||||
'version': '19.0.8.20.2',
|
||||
'category': 'Manufacturing/Plating',
|
||||
'summary': 'Native plating job model — replaces mrp.production / mrp.workorder bridge.',
|
||||
'author': 'Nexa Systems Inc.',
|
||||
|
||||
Reference in New Issue
Block a user