mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Set the parent relationship when serializing StockItem object
- Keep track of which StockItem is came from
This commit is contained in:
parent
ae4ebab957
commit
3715c5d637
@ -487,6 +487,7 @@ class StockItem(MPTTModel):
|
||||
new_item.quantity = 1
|
||||
new_item.serial = serial
|
||||
new_item.pk = None
|
||||
new_item.parent = self
|
||||
|
||||
if location:
|
||||
new_item.location = location
|
||||
|
Loading…
Reference in New Issue
Block a user