diff --git a/InvenTree/company/templates/company/partdetail.html b/InvenTree/company/templates/company/partdetail.html index dd43d0c5e4..681ba25074 100644 --- a/InvenTree/company/templates/company/partdetail.html +++ b/InvenTree/company/templates/company/partdetail.html @@ -101,7 +101,10 @@ InvenTree | {{ company.name }} - Parts -
+
+ +

Purchase Orders

+{% include "order/po_table.html" with orders=part.purchase_orders %} {% endblock %} diff --git a/InvenTree/company/views.py b/InvenTree/company/views.py index f9e032cbe9..c3cda22e39 100644 --- a/InvenTree/company/views.py +++ b/InvenTree/company/views.py @@ -128,6 +128,12 @@ class SupplierPartDetail(DetailView): context_object_name = 'part' queryset = SupplierPart.objects.all() + def get_context_data(self, **kwargs): + ctx = super().get_context_data(**kwargs) + ctx['OrderStatus'] = OrderStatus + + return ctx + class SupplierPartEdit(AjaxUpdateView): """ Update view for editing SupplierPart """