details:   https://code.tryton.org/tryton/commit/592c5386b0f6
branch:    7.6
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 69f7d97b963a -r 592c5386b0f6 modules/production_work/work.py
--- a/modules/production_work/work.py   Sun Feb 01 11:42:38 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:

Reply via email to