From eb38977dca5dddc7ced6a0ba85ab409462114ab9 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Tue, 14 Jul 2026 13:47:40 +0200 Subject: [PATCH] Bug lot.qt --- modules/purchase_trade/lot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/purchase_trade/lot.py b/modules/purchase_trade/lot.py index 1492f5f..19a9ce8 100755 --- a/modules/purchase_trade/lot.py +++ b/modules/purchase_trade/lot.py @@ -4248,6 +4248,10 @@ class LotUnship(Wizard): shipment = lqt.lot_shipment_out if not shipment: continue + if lqt.lot_p and lqt.lot_p.line: + affected_lines.append(lqt.lot_p.line) + if lqt.lot_s and lqt.lot_s.sale_line: + affected_lines.append(lqt.lot_s.sale_line) # Restore the selected scheduled quantity only once, then # remove its shipment-linked lot.qt so it cannot be # unlinked again from the shipment planned tab. @@ -4257,10 +4261,6 @@ class LotUnship(Wizard): elif not lot.updateVirtualPart(qt,None,lqt.lot_s,mode): lot.createVirtualPart(qt,None,lqt.lot_s,mode) LotQt.delete([lqt]) - if lqt.lot_p and lqt.lot_p.line: - affected_lines.append(lqt.lot_p.line) - if lqt.lot_s and lqt.lot_s.sale_line: - affected_lines.append(lqt.lot_s.sale_line) if lot and r.r_lot_type == 'physic': lot = Lot(r.r_lot_p) if lot.lot_type == 'physic':