From 08ad05d005df5d4cae9e00a2831f700ddfa26415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 29 Jan 2026 10:26:59 +0100 Subject: [PATCH] Use create date to calculate production work duration without write date Closes #14562 (grafted from f90bd352ada4554737726ae36878c3446bbdf588) --HG-- branch : 6.0 --- modules/production_work/work.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/production_work/work.py b/modules/production_work/work.py index fa1fcc37b8..e4816a55af 100644 --- a/modules/production_work/work.py +++ b/modules/production_work/work.py @@ -348,7 +348,7 @@ class WorkCycle(Workflow, ModelSQL, ModelView): def set_duration(self, now): if self.duration is None: - self.duration = now - self.write_date + self.duration = now - (self.write_date or self.create_date) def set_cost(self): if self.cost is None: