details: https://code.tryton.org/tryton/commit/af4876fcddf3
branch: 6.0
user: Cédric Krier <[email protected]>
date: Thu Jan 29 10:26:59 2026 +0100
description:
Use create date to calculate production work duration without write date
Closes #14562
(grafted from f90bd352ada4554737726ae36878c3446bbdf588)
diffstat:
modules/production_work/work.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 2386d9c2d4d1 -r af4876fcddf3 modules/production_work/work.py
--- a/modules/production_work/work.py Sun Feb 01 11:41:38 2026 +0100
+++ b/modules/production_work/work.py Thu Jan 29 10:26:59 2026 +0100
@@ -348,7 +348,7 @@
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: