mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-15 22:51:01 +00:00
Improve reporting in stock history API
This commit is contained in:
1 parent
af53b341f0
commit
70ad0ba0de
5 files changed
+18
-7
No files matched your search
@@ -1620,6 +1620,13 @@ class StockItemTracking(models.Model):
|
||||
def get_absolute_url(self):
|
||||
return '/stock/track/{pk}'.format(pk=self.id)
|
||||
|
||||
def label(self):
|
||||
|
||||
if self.tracking_type in StockHistoryCode.keys():
|
||||
return StockHistoryCode.label(self.tracking_type)
|
||||
else:
|
||||
return self.title
|
||||
|
||||
tracking_type = models.IntegerField(
|
||||
default=StockHistoryCode.LEGACY,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user