From 8edfada22a7f2244ba39fd16c414b8f885063055 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 22 Aug 2021 22:08:41 +0200 Subject: [PATCH] adding settings definitions for turning off features --- InvenTree/common/models.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index cf5e44595a..d61ca54b51 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 functionally in InvenTree interface'), + 'default': True, + 'validator': bool, + }, + 'BUY_FUNCTION_ENABLE': { + 'name': _('Enable buy'), + 'description': _('Enable buy functionally in InvenTree interface'), + 'default': True, + 'validator': bool, + }, + 'SELL_FUNCTION_ENABLE': { + 'name': _('Enable sell'), + 'description': _('Enable sell functionally in InvenTree interface'), + 'default': True, + 'validator': bool, + }, + 'STOCK_FUNCTION_ENABLE': { + 'name': _('Enable stock'), + 'description': _('Enable stock functionally in InvenTree interface'), + 'default': True, + 'validator': bool, + }, + 'SO_FUNCTION_ENABLE': { + 'name': _('Enable SO'), + 'description': _('Enable SO functionally in InvenTree interface'), + 'default': True, + 'validator': bool, + }, + 'PO_FUNCTION_ENABLE': { + 'name': _('Enable PO'), + 'description': _('Enable PO functionally in InvenTree interface'), + 'default': True, + 'validator': bool, + }, } class Meta: