diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html
index a7bad6cae4..a3a9736a57 100644
--- a/InvenTree/part/templates/part/detail.html
+++ b/InvenTree/part/templates/part/detail.html
@@ -20,6 +20,7 @@
Deactivate
{% else %}
Activate
+ Delete
{% endif %}
@@ -200,10 +201,10 @@
$('#delete-part').click(function() {
launchModalForm(
- "{% url 'part-delete' part.id %}",
- {
- redirect: {% if part.category %}"{% url 'category-detail' part.category.id %}"{% else %}"{% url 'part-index' %}"{% endif %}
- });
+ "{% url 'part-delete' part.id %}",
+ {
+ redirect: {% if part.category %}"{% url 'category-detail' part.category.id %}"{% else %}"{% url 'part-index' %}"{% endif %}
+ });
});
{% endblock %}
diff --git a/InvenTree/part/templates/part/partial_delete.html b/InvenTree/part/templates/part/partial_delete.html
index 6f2509996b..baa429e2a5 100644
--- a/InvenTree/part/templates/part/partial_delete.html
+++ b/InvenTree/part/templates/part/partial_delete.html
@@ -1,6 +1,11 @@
+{% extends "modal_form.html" %}
+
+{% block pre_form_content %}
+
Are you sure you want to delete part '{{ part.full_name }}'?
{% if part.used_in_count %}
+
This part is used in BOMs for {{ part.used_in_count }} other parts. If you delete this part, the BOMs for the following parts will be updated:
{% for child in part.used_in.all %}
@@ -10,6 +15,7 @@ Are you sure you want to delete part '{{ part.full_name }}'?
{% endif %}
{% if part.locations.all|length > 0 %}
+
There are {{ part.locations.all|length }} stock entries defined for this part. If you delete this part, the following stock entries will also be deleted:
{% for stock in part.locations.all %}
@@ -20,6 +26,7 @@ Are you sure you want to delete part '{{ part.full_name }}'?
{% endif %}
{% if part.supplier_parts.all|length > 0 %}
+
There are {{ part.supplier_parts.all|length }} suppliers defined for this part. If you delete this part, the following supplier parts will also be deleted.
{% for spart in part.supplier_parts.all %}
@@ -30,5 +37,8 @@ Are you sure you want to delete part '{{ part.full_name }}'?
{% endif %}
{% if part.serials.all|length > 0 %}
+
There are {{ part.serials.all|length }} unique parts tracked for '{{ part.full_name }}'. Deleting this part will permanently remove this tracking information.
-{% endif %}
\ No newline at end of file
+{% endif %}
+
+{% endblock %}
\ No newline at end of file