Merge pull request #888 from SchrodingersGat/allow-staff-delete

Allow staff delete
This commit is contained in:
Oliver authored and GitHub committed 2020-07-30 20:29:57 +10:00
commit 8a1f358505
6 files changed
+1039 -674

No files matched your search

Binary file not shown.
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -115,7 +115,7 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
{% endif %}
<li><a href='#' id='stock-duplicate' title='{% trans "Duplicate stock item" %}'><span class='fas fa-copy'></span> {% trans "Duplicate stock item" %}</a></li>
<li><a href='#' id='stock-edit' title='{% trans "Edit stock item" %}'><span class='fas fa-edit icon-blue'></span> {% trans "Edit stock item" %}</a></li>
{% if item.can_delete %}
{% if item.can_delete or user.is_staff %}
<li><a href='#' id='stock-delete' title='{% trans "Delete stock item" %}'><span class='fas fa-trash-alt icon-red'></span> {% trans "Delete stock item" %}</a></li>
{% endif %}
</ul>
@@ -1,11 +1,14 @@
{% extends "modal_delete_form.html" %}
{% load i18n %}
{% load inventree_extras %}
{% block pre_form_content %}
<div class='alert alert-danger alert-block'>
Are you sure you want to delete this stock item?
{% trans "Are you sure you want to delete this stock item?" %}
<br>
This will remove <b>{{ item.quantity }}</b> units of <b>{{ item.part.full_name }}</b> from stock.
This will remove <b>{% decimal item.quantity %}</b> units of <b>{{ item.part.full_name }}</b> from stock.
</div>
{% endblock %}