mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	BOM updates (#10611)
* BOM updates - Allow variants of substititute parts to be allocated - Closes https://github.com/inventree/InvenTree/issues/10606 * Check self.allow_variants * Add comment
This commit is contained in:
		| @@ -4271,6 +4271,11 @@ class BomItem(InvenTree.models.MetadataMixin, InvenTree.models.InvenTreeModel): | ||||
|             for sub in self.substitutes.all(): | ||||
|                 parts.add(sub.part) | ||||
|  | ||||
|                 # Account for variants of the substitute part (if allowed) | ||||
|                 if allow_variants and self.allow_variants: | ||||
|                     for sub_variant in sub.part.get_descendants(include_self=False): | ||||
|                         parts.add(sub_variant) | ||||
|  | ||||
|         valid_parts = [] | ||||
|  | ||||
|         for p in parts: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user