mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 19:20:55 +00:00
Improve options for installing a part into another part
- Allow "variant" parts when the BOM specifies that variants are allowed for a particular BOM item
This commit is contained in:
@ -560,9 +560,8 @@ class StockItemInstall(AjaxUpdateView):
|
||||
|
||||
# Filter for parts to install in this item
|
||||
if self.install_item:
|
||||
# Get parts used in this part's BOM
|
||||
bom_items = self.part.get_bom_items()
|
||||
allowed_parts = [item.sub_part for item in bom_items]
|
||||
# Get all parts which can be installed into this part
|
||||
allowed_parts = self.part.get_installed_part_options()
|
||||
# Filter
|
||||
items = items.filter(part__in=allowed_parts)
|
||||
|
||||
|
Reference in New Issue
Block a user