From 2238dee3e1707e86ae67834caba8bdb7f8e737bd 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 --- 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 6203cd2c22..5a80c52311 100644 --- a/modules/production_work/work.py +++ b/modules/production_work/work.py @@ -406,7 +406,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: