Skip to content

Commit

Permalink
[FIX] stock_product_pack: discriminate outgoing qty in available qty …
Browse files Browse the repository at this point in the history
…for packs
  • Loading branch information
augusto-weiss committed Aug 7, 2024
1 parent f75c95d commit 311f766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stock_product_pack/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _compute_quantities_dict(
sub_qty = subproduct.quantity
if sub_qty:
pack_qty_available.append(
math.floor(subproduct_stock_qties[subproduct_stock.id].get('qty_available') / sub_qty)
math.floor((subproduct_stock_qties[subproduct_stock.id].get('qty_available') - subproduct_stock_qties[subproduct_stock.id].get('outgoing_qty'))/ sub_qty)
)
pack_virtual_available.append(
math.floor(subproduct_stock_qties[subproduct_stock.id].get('virtual_available') / sub_qty)
Expand Down

0 comments on commit 311f766

Please sign in to comment.