details:   https://code.tryton.org/tryton/commit/f79babe93601
branch:    7.0
user:      Cédric Krier <[email protected]>
date:      Mon Sep 07 15:24:40 2026 +0200
description:
        Do not clear incoming moves that has been added to a shipment for 
amendment

        Closes #15070
        (grafted from fb713c8a996ea659217e194c87246f1067c7fb99)
diffstat:

 modules/purchase_amendment/purchase.py |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r ebfc64bc42e5 -r f79babe93601 modules/purchase_amendment/purchase.py
--- a/modules/purchase_amendment/purchase.py    Fri Sep 18 18:49:40 2026 +0200
+++ b/modules/purchase_amendment/purchase.py    Mon Sep 07 15:24:40 2026 +0200
@@ -161,7 +161,7 @@
     @classmethod
     def _stock_moves(cls, line):
         for move in line.moves:
-            if move.state in {'staging', 'draft'}:
+            if move.state in {'staging', 'draft'} and not move.shipment:
                 yield move
 
 

Reply via email to