details:   https://code.tryton.org/tryton/commit/e8637267b3f3
branch:    7.8
user:      Cédric Krier <[email protected]>
date:      Wed Jan 07 08:29:45 2026 +0100
description:
        Use only production inputs or outputs for lot trace

        The production moves can not have any other traces than their sibling 
moves.

        Closes #14385
        (grafted from 35268a75b6c5517754dbb0e2c31579578e97f3fd)
diffstat:

 modules/production/stock.py |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (23 lines):

diff -r 980112777c0f -r e8637267b3f3 modules/production/stock.py
--- a/modules/production/stock.py       Fri Jan 09 11:34:16 2026 +0100
+++ b/modules/production/stock.py       Wed Jan 07 08:29:45 2026 +0100
@@ -206,13 +206,15 @@
             else_=document)
 
     def _get_upward_traces(self):
-        traces = super()._get_upward_traces()
         if self.production_input:
-            traces.update(self.production_input.outputs)
+            traces = set(self.production_input.outputs)
+        else:
+            traces = super()._get_upward_traces()
         return traces
 
     def _get_downward_traces(self):
-        traces = super()._get_downward_traces()
         if self.production_output:
-            traces.update(self.production_output.inputs)
+            traces = set(self.production_output.inputs)
+        else:
+            traces = super()._get_downward_traces()
         return traces

Reply via email to