2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-01 13:06:45 +00:00

Set the parent relationship when serializing StockItem object

- Keep track of which StockItem is came from
This commit is contained in:
Oliver Walters 2020-02-17 22:44:41 +11:00
parent ae4ebab957
commit 3715c5d637

View File

@ -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