From d10169932d635baa5acfb90e3e340ea7108da378 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 29 Jun 2021 12:33:54 +0200 Subject: [PATCH] option to hide related parts #1733 --- InvenTree/common/models.py | 7 +++++++ InvenTree/part/templates/part/navbar.html | 3 +++ InvenTree/templates/InvenTree/settings/part.html | 1 + 3 files changed, 11 insertions(+) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index ddd27b734e..7e56429c51 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -219,6 +219,13 @@ class InvenTreeSetting(models.Model): 'validator': bool, }, + 'PART_SHOW_RELATED': { + 'name': _('Show related parts'), + 'description': _('Display related parts for a part'), + 'default': True, + 'validator': bool, + }, + 'PART_INTERNAL_PRICE': { 'name': _('Internal Prices'), 'description': _('Enable internal prices for parts'), diff --git a/InvenTree/part/templates/part/navbar.html b/InvenTree/part/templates/part/navbar.html index c0bc4c96a3..1fae6aaec2 100644 --- a/InvenTree/part/templates/part/navbar.html +++ b/InvenTree/part/templates/part/navbar.html @@ -3,6 +3,7 @@ {% load inventree_extras %} {% settings_value "PART_INTERNAL_PRICE" as show_internal_price %} +{% settings_value 'PART_SHOW_RELATED' as show_related %}