This commit is contained in:
2026-02-14 08:47:57 +01:00
parent 0be0194ab5
commit b0ebc02434

View File

@@ -730,7 +730,7 @@ class SaleLine(metaclass=PoolMeta):
lot.sale_line = line.id
lot.lot_qt = line.quantity
lot.lot_unit_line = line.unit
lot.lot_quantity = round(line.quantity,5)
lot.lot_quantity = Decimal(str(line.quantity)).quantize(Decimal("0.00001"))#round(line.quantity,5)
lot.lot_status = 'forecast'
lot.lot_type = 'virtual'
lot.lot_product = line.product
@@ -739,7 +739,7 @@ class SaleLine(metaclass=PoolMeta):
lqh = LotQtHist()
lqh.quantity_type = lqtt[0]
lqh.quantity = lot.lot_quantity
lqh.gross_quantity = Decimal(0) #lot.lot_quantity
lqh.gross_quantity = lot.lot_quantity
lot.lot_hist = [lqh]
if line.quantity > 0:
Lot.save([lot])