diff --git a/InvenTree/order/templates/order/order_base.html b/InvenTree/order/templates/order/order_base.html index 71e3455722..3b199c1840 100644 --- a/InvenTree/order/templates/order/order_base.html +++ b/InvenTree/order/templates/order/order_base.html @@ -32,29 +32,31 @@ src="{% static 'img/blank_image.png' %}"

- - {% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %} - {% elif order.status == PurchaseOrderStatus.PLACED %} - - {% endif %} {% if order.status == PurchaseOrderStatus.PENDING or order.status == PurchaseOrderStatus.PLACED %} - {% endif %} + {% endif %} +

diff --git a/InvenTree/order/templates/order/order_notes.html b/InvenTree/order/templates/order/order_notes.html index 237098e10d..0b45a5da4b 100644 --- a/InvenTree/order/templates/order/order_notes.html +++ b/InvenTree/order/templates/order/order_notes.html @@ -28,9 +28,11 @@

{% trans "Order Notes" %}

+ {% if roles.purchase_order.change %}
+ {% endif %}
diff --git a/InvenTree/order/templates/order/po_attachments.html b/InvenTree/order/templates/order/po_attachments.html index f5421e8760..d60d605771 100644 --- a/InvenTree/order/templates/order/po_attachments.html +++ b/InvenTree/order/templates/order/po_attachments.html @@ -14,7 +14,6 @@ {% include "attachment_table.html" with attachments=order.attachments.all %} - {% endblock %} {% block js_ready %} diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 9b9eddb887..642ff96d4a 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -12,7 +12,7 @@
- {% if order.status == PurchaseOrderStatus.PENDING %} + {% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %} {% 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 %} + {% endif %}
diff --git a/InvenTree/order/templates/order/sales_order_base.html b/InvenTree/order/templates/order/sales_order_base.html index 52856cadbd..2eb13eaa64 100644 --- a/InvenTree/order/templates/order/sales_order_base.html +++ b/InvenTree/order/templates/order/sales_order_base.html @@ -41,12 +41,10 @@ src="{% static 'img/blank_image.png' %}"

{{ order.description }}

+ {% if roles.sales_order.change %} - {% if order.status == SalesOrderStatus.PENDING %} {% endif %} + {% endif %} +
{% endblock %} diff --git a/InvenTree/order/templates/order/sales_orders.html b/InvenTree/order/templates/order/sales_orders.html index 4e29156773..dfe09d5d0d 100644 --- a/InvenTree/order/templates/order/sales_orders.html +++ b/InvenTree/order/templates/order/sales_orders.html @@ -14,7 +14,9 @@ InvenTree | {% trans "Sales Orders" %}
+ {% if roles.sales_order.add %} + {% endif %}