details: https://code.tryton.org/tryton/commit/c2b7841c8362
branch: 7.8
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 913effe69250 -r c2b7841c8362 modules/production_work/work.py
--- a/modules/production_work/work.py Sun Feb 01 11:42:15 2026 +0100
+++ b/modules/production_work/work.py Thu Jan 29 10:26:59 2026 +0100
@@ -406,7 +406,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: