From 6816071388e87e88b82728a0cb16e15683002fe8 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 13 Oct 2021 14:44:59 +1100 Subject: [PATCH] Simplify BOM editing view - A user with permission to edit BOM data can immediately access the BOM editing tools --- InvenTree/part/templates/part/bom.html | 15 +++------------ InvenTree/part/templates/part/detail.html | 22 ++++++---------------- InvenTree/part/test_views.py | 10 ---------- InvenTree/part/views.py | 11 ++--------- 4 files changed, 11 insertions(+), 47 deletions(-) diff --git a/InvenTree/part/templates/part/bom.html b/InvenTree/part/templates/part/bom.html index 750e205e04..6808630ed1 100644 --- a/InvenTree/part/templates/part/bom.html +++ b/InvenTree/part/templates/part/bom.html @@ -1,7 +1,7 @@ {% load i18n %} {% load inventree_extras %} -{% if roles.part.change != True and editing_enabled %} +{% if not roles.part.change %}
{% trans "You do not have permission to edit the BOM." %}
@@ -23,7 +23,7 @@
- {% if editing_enabled %} + {% if roles.part.change %} @@ -35,17 +35,9 @@ {% endif %} - - - {% elif part.active %} - {% if roles.part.change %} - {% if part.is_bom_valid == False %}