- Ignore virtual parts when considering "can_build" quantity
- Closes https://github.com/inventree/InvenTree/issues/11182
(cherry picked from commit 64acdd6ccf)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
9c1ee69325
commit
9256a88630
|
|
@ -1577,8 +1577,8 @@ class Part(
|
|||
if not self.has_bom:
|
||||
return 0
|
||||
|
||||
# Prefetch related tables, to reduce query expense
|
||||
queryset = self.get_bom_items()
|
||||
# Ignore virtual parts when calculating the "can_build" quantity
|
||||
queryset = self.get_bom_items(include_virtual=False)
|
||||
|
||||
# Ignore 'consumable' BOM items for this calculation
|
||||
queryset = queryset.filter(consumable=False)
|
||||
|
|
|
|||
Loading…
Reference in New Issue