Skip to content

Commit

Permalink
[FIX] stock_reserve_rule: _apply_strategy_single_lot stratagy is upda…
Browse files Browse the repository at this point in the history
…ted.
  • Loading branch information
geomer198 committed Sep 28, 2023
1 parent 4287699 commit 659341b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions stock_reserve_rule/models/stock_reserve_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def _apply_strategy_single_lot(self, quants):
("lot_id", "!=", False),
("location_id", "in", location.ids),
("product_id", "=", product.id),
("quantity", ">", 0),
],
["lot_id", "quantity"],
["lot_id"],
Expand All @@ -342,6 +343,7 @@ def _apply_strategy_single_lot(self, quants):
for rec_id, product_qty in lot_ids_with_quantity.items():
if comparison(product_qty, need):
lot_id = rec_id
break
if location_quantity > 0 and lot_id:
lot_id = self.env["stock.production.lot"].browse(lot_id)
need = yield location, location_quantity, need, lot_id, None

0 comments on commit 659341b

Please sign in to comment.