2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-09 07:00:56 +00:00

Replace other choice fields with commonized status code

This commit is contained in:
Oliver Walters
2019-06-04 23:38:52 +10:00
parent 8d70d2f28a
commit f731c45ce8
5 changed files with 67 additions and 39 deletions

View File

@ -20,6 +20,7 @@ from .serializers import StockTrackingSerializer
from InvenTree.views import TreeSerializer
from InvenTree.helpers import str2bool
from InvenTree.status_codes import StockStatus
import os
@ -311,7 +312,7 @@ class StockList(generics.ListCreateAPIView):
else:
item['location__path'] = None
item['status_text'] = StockItem.ITEM_STATUS_CODES[item['status']]
item['status_text'] = StockStatus.label(item['status'])
return Response(data)