From 4f985ae225b6004f915ee6d3ea990b189451588c Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 13 Oct 2021 09:40:17 +1100 Subject: [PATCH] Revert 1fb76b9 Removes global functions to enable / disable entire sections of functionality --- InvenTree/common/models.py | 38 ------------------- .../company/templates/company/navbar.html | 10 +---- InvenTree/part/templates/part/navbar.html | 18 ++------- InvenTree/part/templates/part/part_base.html | 11 +----- .../templates/InvenTree/settings/build.html | 2 - .../templates/InvenTree/settings/po.html | 3 -- .../templates/InvenTree/settings/so.html | 3 -- .../templates/InvenTree/settings/stock.html | 2 - InvenTree/templates/navbar.html | 18 ++------- 9 files changed, 10 insertions(+), 95 deletions(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index b9b7d9e20d..d0dfc7b014 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -793,44 +793,6 @@ class InvenTreeSetting(BaseInvenTreeSetting): 'default': 'PO', }, - # enable/diable ui elements - 'BUILD_FUNCTION_ENABLE': { - 'name': _('Enable build'), - 'description': _('Enable build functionality in InvenTree interface'), - 'default': True, - 'validator': bool, - }, - 'BUY_FUNCTION_ENABLE': { - 'name': _('Enable buy'), - 'description': _('Enable buy functionality in InvenTree interface'), - 'default': True, - 'validator': bool, - }, - 'SELL_FUNCTION_ENABLE': { - 'name': _('Enable sell'), - 'description': _('Enable sell functionality in InvenTree interface'), - 'default': True, - 'validator': bool, - }, - 'STOCK_FUNCTION_ENABLE': { - 'name': _('Enable stock'), - 'description': _('Enable stock functionality in InvenTree interface'), - 'default': True, - 'validator': bool, - }, - 'SO_FUNCTION_ENABLE': { - 'name': _('Enable SO'), - 'description': _('Enable SO functionality in InvenTree interface'), - 'default': True, - 'validator': bool, - }, - 'PO_FUNCTION_ENABLE': { - 'name': _('Enable PO'), - 'description': _('Enable PO functionality in InvenTree interface'), - 'default': True, - 'validator': bool, - }, - # login / SSO 'LOGIN_ENABLE_PWD_FORGOT': { 'name': _('Enable password forgot'), diff --git a/InvenTree/company/templates/company/navbar.html b/InvenTree/company/templates/company/navbar.html index 3c307704e6..b652d6b603 100644 --- a/InvenTree/company/templates/company/navbar.html +++ b/InvenTree/company/templates/company/navbar.html @@ -2,10 +2,6 @@ {% load static %} {% load inventree_extras %} -{% settings_value 'STOCK_FUNCTION_ENABLE' as enable_stock %} -{% settings_value 'SO_FUNCTION_ENABLE' as enable_so %} -{% settings_value 'PO_FUNCTION_ENABLE' as enable_po %} -