From 36d6628eb6f41941c0f4881bc7f54b8a0fb473fb Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 13 Oct 2021 09:55:21 +1100 Subject: [PATCH 1/3] Revert PR which allowed hiding of major UI functions --- InvenTree/common/models.py | 37 ------------------- .../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(+), 94 deletions(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index aed6f2bf14..40cb2ddd5c 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -789,43 +789,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, - }, } class Meta: 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 %} -