mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Furher logic improvements to BOM copy
- Remove "self" part from list - Stop inherited BOM items from being copied incorrectly - Allow user to select whether "inherited" BOM items are copied
This commit is contained in:
		| @@ -661,7 +661,7 @@ function loadBomTable(table, options={}) { | ||||
|             if (!row.inherited) { | ||||
|                 return yesNoLabel(false); | ||||
|             } else if (row.part == options.parent_id) { | ||||
|                 return '{% trans "Inherited" %}'; | ||||
|                 return yesNoLabel(true); | ||||
|             } else { | ||||
|                 // If this BOM item is inherited from a parent part | ||||
|                 return renderLink( | ||||
|   | ||||
| @@ -438,15 +438,20 @@ function duplicateBom(part_id, options={}) { | ||||
|                 icon: 'fa-shapes', | ||||
|                 filters: { | ||||
|                     assembly: true, | ||||
|                     ancestor: part_id, | ||||
|                     exclude_tree: part_id, | ||||
|                 } | ||||
|             }, | ||||
|             remove_existing: { | ||||
|                 value: true, | ||||
|             }, | ||||
|             include_inherited: {}, | ||||
|             remove_existing: {}, | ||||
|             skip_invalid: {}, | ||||
|         }, | ||||
|         confirm: true, | ||||
|         title: '{% trans "Copy Bill of Materials" %}', | ||||
|         onSuccess: function(response) { | ||||
|             if (options.success) { | ||||
|                 options.success(response); | ||||
|             } | ||||
|         }, | ||||
|     }); | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user