mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 20:46:47 +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:
parent
7b1b476851
commit
9d2ca5e617
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user