From 9fd4b5cce34006b61a1e3cdca635eb7cf5f35d74 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 22 Aug 2021 23:36:49 +0200 Subject: [PATCH] use new setting for part-actions PR complete for #1999 --- InvenTree/part/templates/part/part_base.html | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/InvenTree/part/templates/part/part_base.html b/InvenTree/part/templates/part/part_base.html index 0d9cbd9907..b91ff53118 100644 --- a/InvenTree/part/templates/part/part_base.html +++ b/InvenTree/part/templates/part/part_base.html @@ -10,6 +10,11 @@ {% block content %} +{% settings_value 'BUY_FUNCTION_ENABLE' as enable_buy %} +{% settings_value 'SELL_FUNCTION_ENABLE' as enable_sell %} +{% settings_value 'PO_FUNCTION_ENABLE' as enable_po %} +{% settings_value 'STOCK_FUNCTION_ENABLE' as enable_stock %} +

{{ part.full_name }}

@@ -80,10 +85,12 @@
{% endif %} {% if part.active %} + {% if enable_buy or enable_sell %} - {% if roles.stock.change %} + {% endif %} + {% if roles.stock.change and enable_stock %}
{% endif %} - {% if part.purchaseable %} - {% if roles.purchase_order.add %} + {% if part.purchaseable and roles.purchase_order.add %} + {% if enable_buy and enable_po %}