Set null location on stock item: (#8565)

- When consumed by a build order
- When shipped to a customer
This commit is contained in:
Oliver authored and GitHub committed 2024-11-26 20:29:37 +11:00
1 parent 7b1b476851
commit 9d2ca5e617
2 files changed
+2

No files matched your search

+1
View File
@@ -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(
+1
View File
@@ -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}