details:   https://code.tryton.org/tryton/commit/9b1d5b0341b3
branch:    7.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 5e5ad682567d -r 9b1d5b0341b3 modules/production_work/work.py
--- a/modules/production_work/work.py   Sun Feb 01 11:41:11 2026 +0100
+++ b/modules/production_work/work.py   Thu Jan 29 10:26:59 2026 +0100
@@ -421,7 +421,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:

Reply via email to