Skip to content

Commit

Permalink
Fix for PurchaseOrder template (#4891)
Browse files Browse the repository at this point in the history
- Fixes bug which removes javascript incorrectly
  • Loading branch information
SchrodingersGat committed May 24, 2023
1 parent 53e442f commit 4868194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion InvenTree/order/templates/order/purchase_order_detail.html
Expand Up @@ -130,6 +130,7 @@ <h4>{% trans "Order Notes" %}</h4>
{% endblock page_content %}

{% block js_ready %}
{% settings_value "PURCHASEORDER_EDIT_COMPLETED_ORDERS" as allow_extra_editing %}

{{ block.super }}

Expand Down Expand Up @@ -174,7 +175,7 @@ <h4>{% trans "Order Notes" %}</h4>
filterkey: "postock"
});

{% if order.status == PurchaseOrderStatus.PENDING %}
{% if order.is_open or allow_extra_editing %}
$('#new-po-line').click(function() {

createPurchaseOrderLineItem({{ order.pk }}, {
Expand Down

0 comments on commit 4868194

Please sign in to comment.