Export human-readable status code

This commit is contained in:
Oliver Walters 2019-09-09 00:02:08 +10:00
parent fff42e7dbb
commit 11c946be4d
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,7 @@ class StatusCode:
@classmethod
def label(cls, value):
""" Return the status code label associated with the provided value """
return cls.options.get(value, '')
return cls.options.get(value, value)
class OrderStatus(StatusCode):

View File

@ -18,6 +18,7 @@ from InvenTree.views import AjaxView
from InvenTree.views import AjaxUpdateView, AjaxDeleteView, AjaxCreateView
from InvenTree.views import QRCodeView
from InvenTree.status_codes import StockStatus
from InvenTree.helpers import str2bool, DownloadFile, GetExportFormats
from InvenTree.helpers import ExtractSerialNumbers
from datetime import datetime
@ -272,7 +273,7 @@ class StockExport(AjaxView):
line.append(item.quantity)
line.append(item.batch)
line.append(item.serial)
line.append(item.status)
line.append(StockStatus.label(item.status))
line.append(item.notes)
line.append(item.review_needed)
line.append(item.updated)