- {% if order.status == PurchaseOrderStatus.PENDING %}
+ {% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %}
{% trans "Add Line Item" %}
{% endif %}
@@ -209,12 +209,12 @@ $("#po-table").inventreeTable({
var pk = row.pk;
- {% if order.status == PurchaseOrderStatus.PENDING %}
+ {% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.delete %}
html += makeIconButton('fa-edit icon-blue', 'button-line-edit', pk, '{% trans "Edit line item" %}');
html += makeIconButton('fa-trash-alt icon-red', 'button-line-delete', pk, '{% trans "Delete line item" %}');
{% endif %}
- {% if order.status == PurchaseOrderStatus.PLACED %}
+ {% if order.status == PurchaseOrderStatus.PLACED and roles.purchase_order.change %}
if (row.received < row.quantity) {
html += makeIconButton('fa-clipboard-check', 'button-line-receive', pk, '{% trans "Receive line item" %}');
}
diff --git a/InvenTree/order/templates/order/purchase_orders.html b/InvenTree/order/templates/order/purchase_orders.html
index 1019092151..d02af36ff5 100644
--- a/InvenTree/order/templates/order/purchase_orders.html
+++ b/InvenTree/order/templates/order/purchase_orders.html
@@ -14,7 +14,9 @@ InvenTree | {% trans "Purchase Orders" %}
+ {% if roles.purchase_order.add %}
{% trans "New Purchase Order" %}
+ {% endif %}