diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html
index 9cee52bed0..30eb48849c 100644
--- a/InvenTree/order/templates/order/purchase_order_detail.html
+++ b/InvenTree/order/templates/order/purchase_order_detail.html
@@ -70,8 +70,12 @@ InvenTree | {{ order }}
{% for line in order.lines.all %}
{{ forloop.counter }} |
+ {% if line.part %}
{{ line.part.part.full_name }} |
{{ line.part.SKU }} |
+ {% else %}
+ Warning: Part has been deleted. |
+ {% endif %}
{{ line.reference }} |
{{ line.quantity }} |
{{ line.received }} |
@@ -98,6 +102,17 @@ $('#new-po-line').click(function() {
data: {
order: {{ order.id }},
},
+ secondary: [
+ {
+ field: 'part',
+ label: 'New Supplier Part',
+ title: 'Create new supplier part',
+ url: "{% url 'supplier-part-create' %}",
+ data: {
+ supplier: {{ order.supplier.id }},
+ },
+ },
+ ],
}
);
});