mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
allocatedItems function now takes variants into account
This commit is contained in:
parent
9baf856d75
commit
ee9df039cb
@ -881,9 +881,12 @@ class Build(MPTTModel):
|
||||
output - Build output (StockItem).
|
||||
"""
|
||||
|
||||
# Remember, if 'variant' stock is allowed to be allocated, it becomes more complicated!
|
||||
variants = part.get_descendants(include_self=True)
|
||||
|
||||
allocations = BuildItem.objects.filter(
|
||||
build=self,
|
||||
stock_item__part=part,
|
||||
stock_item__part__pk__in=[p.pk for p in variants],
|
||||
install_into=output,
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user