details: https://code.tryton.org/tryton/commit/f90bd352ada4
branch: default
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
diffstat:
modules/production_work/work.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r afe3d31157bf -r f90bd352ada4 modules/production_work/work.py
--- a/modules/production_work/work.py Fri Jan 30 17:32:18 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: