mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 11:40:58 +00:00
Add UUID field to StockItem model
This commit is contained in:
@ -11,6 +11,7 @@ from django.db.models.signals import pre_delete
|
||||
from django.dispatch import receiver
|
||||
|
||||
from datetime import datetime
|
||||
import uuid
|
||||
|
||||
from InvenTree.models import InvenTreeTree
|
||||
|
||||
@ -116,6 +117,9 @@ class StockItem(models.Model):
|
||||
('part', 'serial'),
|
||||
]
|
||||
|
||||
# UUID for generating QR codes
|
||||
uuid = models.UUIDField(default=uuid.uuid4, blank=True, editable=False)
|
||||
|
||||
# The 'master' copy of the part of which this stock item is an instance
|
||||
part = models.ForeignKey('part.Part', on_delete=models.CASCADE, related_name='locations')
|
||||
|
||||
|
Reference in New Issue
Block a user