mirror of
https://github.com/inventree/InvenTree.git
synced 2026-03-11 22:54:17 +00:00
- 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:
committed by
GitHub
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)
|
||||
|
||||
Reference in New Issue
Block a user