mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
Add quantity field to StockItemTracking
- Keep track of historical levels of part availability
This commit is contained in:
@ -209,6 +209,7 @@ class StockItem(models.Model):
|
||||
item=self,
|
||||
title=title,
|
||||
user=user,
|
||||
quantity=self.quantity,
|
||||
date=datetime.now().date(),
|
||||
notes=notes,
|
||||
system=system
|
||||
@ -346,6 +347,9 @@ class StockItemTracking(models.Model):
|
||||
# Was this tracking note auto-generated by the system?
|
||||
system = models.BooleanField(default=False)
|
||||
|
||||
# Keep track of the StockItem quantity throughout the tracking history
|
||||
quantity = models.PositiveIntegerField(validators=[MinValueValidator(0)], default=1)
|
||||
|
||||
# TODO
|
||||
# image = models.ImageField(upload_to=func, max_length=255, null=True, blank=True)
|
||||
|
||||
|
Reference in New Issue
Block a user