mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 12:06:44 +00:00
Fix rendering of purchase order status codes
This commit is contained in:
parent
76a72be926
commit
8d70d2f28a
@ -11,6 +11,7 @@ from django.views.generic import DetailView, ListView
|
|||||||
from django.forms import HiddenInput
|
from django.forms import HiddenInput
|
||||||
|
|
||||||
from InvenTree.views import AjaxCreateView, AjaxUpdateView, AjaxDeleteView
|
from InvenTree.views import AjaxCreateView, AjaxUpdateView, AjaxDeleteView
|
||||||
|
from InvenTree.status_codes import OrderStatus
|
||||||
|
|
||||||
from .models import Company
|
from .models import Company
|
||||||
from .models import SupplierPart
|
from .models import SupplierPart
|
||||||
@ -57,6 +58,12 @@ class CompanyDetail(DetailView):
|
|||||||
queryset = Company.objects.all()
|
queryset = Company.objects.all()
|
||||||
model = Company
|
model = Company
|
||||||
|
|
||||||
|
def get_context_data(self, **kwargs):
|
||||||
|
ctx = super().get_context_data(**kwargs)
|
||||||
|
ctx['OrderStatus'] = OrderStatus
|
||||||
|
|
||||||
|
return ctx
|
||||||
|
|
||||||
|
|
||||||
class CompanyImage(AjaxUpdateView):
|
class CompanyImage(AjaxUpdateView):
|
||||||
""" View for uploading an image for the Company """
|
""" View for uploading an image for the Company """
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{% if order.status == order.PENDING %}
|
{% if order.status == OrderStatus.PENDING %}
|
||||||
<span class='label label-info'>
|
<span class='label label-info'>
|
||||||
{% elif order.status == order.PLACED %}
|
{% elif order.status == OrderStatus.PLACED %}
|
||||||
<span class='label label-primary'>
|
<span class='label label-primary'>
|
||||||
{% elif order.status == order.COMPLETE %}
|
{% elif order.status == OrderStatus.COMPLETE %}
|
||||||
<span class='label label-success'>
|
<span class='label label-success'>
|
||||||
{% elif order.status == order.CANCELLED or order.status == order.RETURNED %}
|
{% elif order.status == OrderStatus.CANCELLED or order.status == OrderStatus.RETURNED %}
|
||||||
<span class='label label-warning'>
|
<span class='label label-warning'>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class='label label-danger'>
|
<span class='label label-danger'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user