mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Improve filter for auto-allocation of build item (#3603)
This commit is contained in:
parent
978d18d01b
commit
349bbb8545
@ -674,10 +674,8 @@ class Build(MPTTModel, ReferenceIndexingMixin):
|
|||||||
|
|
||||||
parts = bom_item.get_valid_parts_for_allocation()
|
parts = bom_item.get_valid_parts_for_allocation()
|
||||||
|
|
||||||
for part in parts:
|
|
||||||
|
|
||||||
items = StockModels.StockItem.objects.filter(
|
items = StockModels.StockItem.objects.filter(
|
||||||
part=part,
|
part__in=parts,
|
||||||
serial=str(serial),
|
serial=str(serial),
|
||||||
quantity=1,
|
quantity=1,
|
||||||
).filter(StockModels.StockItem.IN_STOCK_FILTER)
|
).filter(StockModels.StockItem.IN_STOCK_FILTER)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user