mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 05:46:34 +00:00
Add ablity to serialize an existing quantity of stock
- Do not have to serialize all the stock - Add tests - Add function to copy entire stock transaction history
This commit is contained in:
@ -43,6 +43,7 @@
|
||||
name: 'Widget'
|
||||
description: 'A watchamacallit'
|
||||
category: 7
|
||||
trackable: true
|
||||
|
||||
- model: part.part
|
||||
pk: 50
|
||||
|
@ -843,7 +843,8 @@ class Part(models.Model):
|
||||
# Copy the BOM data
|
||||
if kwargs.get('bom', False):
|
||||
for item in other.bom_items.all():
|
||||
# Point the item to THIS part
|
||||
# Point the item to THIS part.
|
||||
# Set the pk to None so a new entry is created.
|
||||
item.part = self
|
||||
item.pk = None
|
||||
item.save()
|
||||
|
Reference in New Issue
Block a user