From 40792246586dbc5701e5e428397b80e610334868 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 24 May 2023 16:18:54 +1000 Subject: [PATCH] Fix for PurchaseOrder template (#4885) - Fixes bug which removes javascript incorrectly --- InvenTree/order/templates/order/purchase_order_detail.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index f6cf72643d..e484b245c4 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -129,6 +129,7 @@ {% endblock page_content %} {% block js_ready %} +{% settings_value "PURCHASEORDER_EDIT_COMPLETED_ORDERS" as allow_extra_editing %} {{ block.super }} @@ -173,7 +174,7 @@ filterkey: "postock" }); -{% if order.status == PurchaseOrderStatus.PENDING %} +{% if order.is_open or allow_extra_editing %} $('#new-po-line').click(function() { createPurchaseOrderLineItem({{ order.pk }}, {