mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Set null location on stock item: (#8565)
- When consumed by a build order - When shipped to a customer
This commit is contained in:
		| @@ -1750,6 +1750,7 @@ class BuildItem(InvenTree.models.InvenTreeMetadataModel): | ||||
|         else: | ||||
|             # Mark the item as "consumed" by the build order | ||||
|             item.consumed_by = self.build | ||||
|             item.location = None | ||||
|             item.save(add_note=False) | ||||
|  | ||||
|             item.add_tracking_entry( | ||||
|   | ||||
| @@ -1403,6 +1403,7 @@ class StockItem( | ||||
|         # Assign the other stock item into this one | ||||
|         stock_item.belongs_to = self | ||||
|         stock_item.consumed_by = build | ||||
|         stock_item.location = None | ||||
|         stock_item.save(add_note=False) | ||||
|  | ||||
|         deltas = {'stockitem': self.pk} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user