Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Disable edit for non-new order lines

Marcin Gębala7dcfac9d48c9
diff --git a/saleor/dashboard/templates/dashboard/order/detail.html b/saleor/dashboard/templates/dashboard/order/detail.html
index aa574ed7f8..512e4e96de 100644
--- a/saleor/dashboard/templates/dashboard/order/detail.html
+++ b/saleor/dashboard/templates/dashboard/order/detail.html
@@ -40,7 +40,9 @@
<td>{{ item.product_sku }}</td>
<td>{% gross item.get_price_per_item %}</td>
<td>{{ item.quantity }}</td>
- <td><a class="btn btn-link" data-target="#base-modal" href="{% url 'dashboard:order-line-edit' pk=item.pk %}" data-toggle="modal">Edit</a></td>
+ <td>
+ <a class="btn btn-link" data-target="#base-modal" href="{% url 'dashboard:order-line-edit' pk=item.pk %}" data-toggle="modal" {% if group.status != 'new' %}disabled{% endif %}>Edit</a>
+ </td>
</tr>
{% endfor %}
</tbody>