details:   https://code.tryton.org/tryton/commit/4b38a680f4ee
branch:    default
user:      Cédric Krier <[email protected]>
date:      Tue May 12 09:02:55 2026 +0200
description:
        Include timesheet cost in production work only if timesheet cost module 
is activated

        f2642fe60c20 extends the cost method using the cost price of the 
timesheet line
        but without ensuring the module is activated.

        Closes #14830
diffstat:

 modules/production_work_timesheet/tryton.cfg |  1 +
 modules/production_work_timesheet/work.py    |  4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diffs (22 lines):

diff -r 143883125d7e -r 4b38a680f4ee 
modules/production_work_timesheet/tryton.cfg
--- a/modules/production_work_timesheet/tryton.cfg      Thu May 07 13:34:06 
2026 +0200
+++ b/modules/production_work_timesheet/tryton.cfg      Tue May 12 09:02:55 
2026 +0200
@@ -20,3 +20,4 @@
 [register timesheet_cost]
 model:
     work.WorkCenter
+    work.Work_TimesheetCost
diff -r 143883125d7e -r 4b38a680f4ee modules/production_work_timesheet/work.py
--- a/modules/production_work_timesheet/work.py Thu May 07 13:34:06 2026 +0200
+++ b/modules/production_work_timesheet/work.py Tue May 12 09:02:55 2026 +0200
@@ -130,6 +130,10 @@
                     'timesheet_end_date': date,
                     })
 
+
+class Work_TimesheetCost(metaclass=PoolMeta):
+    __name__ = 'production.work'
+
     @classmethod
     def _get_cost(cls, works):
         pool = Pool()

Reply via email to