Display list of purchase orders against a particular supplier par

This commit is contained in:
Oliver Walters 2019-06-05 21:50:11 +10:00
parent 67248ec4dd
commit 04abe2b3d1
2 changed files with 10 additions and 1 deletions

View File

@ -101,7 +101,10 @@ InvenTree | {{ company.name }} - Parts
</div>
</div>
<br>
<hr>
<h4>Purchase Orders</h4>
{% include "order/po_table.html" with orders=part.purchase_orders %}
{% endblock %}

View File

@ -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 """