mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 13:56:30 +00:00
PEP fixes
This commit is contained in:
@ -30,7 +30,16 @@ def build_status(key, *args, **kwargs):
|
||||
return mark_safe(BuildStatus.render(key))
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def sales_order_codes(*args, **kwargs):
|
||||
print("doing")
|
||||
return "hello world"
|
||||
@register.simple_tag(takes_context=True)
|
||||
def load_status_codes(context):
|
||||
"""
|
||||
Make the various StatusCodes available to the page context
|
||||
"""
|
||||
|
||||
context['purchase_order_status_codes'] = PurchaseOrderStatus.list()
|
||||
context['sales_order_status_codes'] = SalesOrderStatus.list()
|
||||
context['stock_status_codes'] = StockStatus.list()
|
||||
context['build_status_codes'] = BuildStatus.list()
|
||||
|
||||
# Need to return something as the result is rendered to the page
|
||||
return ''
|
||||
|
@ -38,7 +38,6 @@ from InvenTree.views import AjaxView, AjaxCreateView, AjaxUpdateView, AjaxDelete
|
||||
from InvenTree.views import QRCodeView
|
||||
|
||||
from InvenTree.helpers import DownloadFile, str2bool
|
||||
from InvenTree.status_codes import PurchaseOrderStatus, BuildStatus
|
||||
|
||||
|
||||
class PartIndex(ListView):
|
||||
|
Reference in New Issue
Block a user