From bd65a42410fa6b7413925fbbc8011effa43bdf37 Mon Sep 17 00:00:00 2001 From: eeintech Date: Tue, 6 Apr 2021 08:49:45 -0400 Subject: [PATCH] Removed global setting for manufacturer parts (enabled for all users) --- InvenTree/common/models.py | 7 ------- .../templates/company/detail_manufacturer_part.html | 9 --------- InvenTree/company/templates/company/navbar.html | 5 ++--- InvenTree/part/templates/part/manufacturer.html | 7 ------- InvenTree/part/templates/part/navbar.html | 3 --- InvenTree/templates/InvenTree/search.html | 3 --- InvenTree/templates/InvenTree/settings/part.html | 2 -- 7 files changed, 2 insertions(+), 34 deletions(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index a785e944bc..df8e3b2d37 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -202,13 +202,6 @@ class InvenTreeSetting(models.Model): 'validator': bool, }, - 'PART_ENABLE_MANUFACTURER_PARTS': { - 'name': _('Enable Manufacturer Parts'), - 'description': _('Enable the use of manufacturer parts for purchasing'), - 'default': False, - 'validator': bool, - }, - 'REPORT_DEBUG_MODE': { 'name': _('Debug Mode'), 'description': _('Generate reports in debug mode (HTML output)'), diff --git a/InvenTree/company/templates/company/detail_manufacturer_part.html b/InvenTree/company/templates/company/detail_manufacturer_part.html index 8499512b4c..902d456eaf 100644 --- a/InvenTree/company/templates/company/detail_manufacturer_part.html +++ b/InvenTree/company/templates/company/detail_manufacturer_part.html @@ -13,9 +13,7 @@ {% block details %} -{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %} -{% if manufacturer_parts.value == "True" %} {% if roles.purchase_order.change %}
@@ -50,16 +48,9 @@
-{% else %} -
- {% trans "Manufactured parts are disabled. Admin users can enable them in the global settings." %} -
-{% endif %} - {% endblock %} {% block js_ready %} {{ block.super }} -{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %} $("#manufacturer-part-create").click(function () { launchModalForm( diff --git a/InvenTree/company/templates/company/navbar.html b/InvenTree/company/templates/company/navbar.html index 3010eb47fe..9a3d3ee4c6 100644 --- a/InvenTree/company/templates/company/navbar.html +++ b/InvenTree/company/templates/company/navbar.html @@ -2,8 +2,6 @@ {% load static %} {% load inventree_extras %} -{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %} -