diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index cf5e44595a..0e825e53b3 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -783,6 +783,44 @@ class InvenTreeSetting(BaseInvenTreeSetting): 'description': _('Prefix value for purchase order reference'), '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 b652d6b603..3c307704e6 100644 --- a/InvenTree/company/templates/company/navbar.html +++ b/InvenTree/company/templates/company/navbar.html @@ -2,6 +2,10 @@ {% 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 %} +