This commit is contained in:
2026-02-14 17:53:36 +01:00
parent 9ed4d5f6bb
commit 981a97ed05

View File

@@ -2015,6 +2015,7 @@ class LotShipping(Wizard):
raise UserError("Please unlink before linking to a new shipment !")
else:
shipped_quantity = Decimal(str(r.r_lot_quantity)).quantize(Decimal("0.00001"))
logger.info("LotShipping:%s",shipped_quantity)
shipment_origin = None
if self.ship.quantity:
shipped_quantity = self.ship.quantity
@@ -2057,6 +2058,7 @@ class LotShipping(Wizard):
lqt = LotQt(r.id - 10000000)
#Increase forecasted virtual part shipped
if not lqt.lot_p.updateVirtualPart(shipped_quantity,shipment_origin,lqt.lot_s):
logger.info("LotShipping2:%s",shipped_quantity)
lqt.lot_p.createVirtualPart(shipped_quantity,shipment_origin,lqt.lot_s)
#Decrease forecasted virtual part non shipped
lqt.lot_p.updateVirtualPart(-shipped_quantity,None,lqt.lot_s)