mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Removed global setting for manufacturer parts (enabled for all users)
This commit is contained in:
parent
fd66e8b136
commit
bd65a42410
@ -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)'),
|
||||
|
@ -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 %}
|
||||
<div id='button-toolbar'>
|
||||
<div class='button-toolbar container-fluid'>
|
||||
@ -50,16 +48,9 @@
|
||||
<table class='table table-striped table-condensed' id='part-table' data-toolbar='#button-toolbar'>
|
||||
</table>
|
||||
|
||||
{% else %}
|
||||
<div class='alert alert-block alert-warning'>
|
||||
{% trans "Manufactured parts are disabled. Admin users can enable them in the global settings." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
||||
|
||||
$("#manufacturer-part-create").click(function () {
|
||||
launchModalForm(
|
||||
|
@ -2,8 +2,6 @@
|
||||
{% load static %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
||||
|
||||
<ul class='list-group'>
|
||||
<li class='list-group-item'>
|
||||
<a href='#' id='company-menu-toggle'>
|
||||
@ -18,7 +16,7 @@
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if manufacturer_parts.value == "True" and company.is_manufacturer %}
|
||||
{% if company.is_manufacturer %}
|
||||
<li class='list-group-item {% if tab == "manufacturer_parts" %}active{% endif %}' title='{% trans "Manufactured Parts" %}'>
|
||||
<a href='{% url "company-detail-manufacturer-parts" company.id %}'>
|
||||
<span class='fas fa-industry'></span>
|
||||
@ -26,6 +24,7 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if company.is_supplier or company.is_manufacturer %}
|
||||
<li class='list-group-item {% if tab == "supplier_parts" %}active{% endif %}' title='{% trans "Supplied Parts" %}'>
|
||||
<a href='{% url "company-detail-supplier-parts" company.id %}'>
|
||||
|
@ -12,9 +12,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
||||
|
||||
{% if manufacturer_parts.value == "True" %}
|
||||
<div id='button-toolbar'>
|
||||
<div class='btn-group'>
|
||||
<button class="btn btn-success" id='manufacturer-create'>
|
||||
@ -31,11 +29,6 @@
|
||||
|
||||
<table class="table table-striped table-condensed" id='manufacturer-table' data-toolbar='#button-toolbar'>
|
||||
</table>
|
||||
{% else %}
|
||||
<div class='alert alert-block alert-warning'>
|
||||
{% trans "Manufactured parts are disabled. Admin users can enable them in the global settings." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
@ -68,16 +68,13 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
||||
{% if part.purchaseable and roles.purchase_order.view %}
|
||||
{% if manufacturer_parts.value == "True" %}
|
||||
<li class='list-group-item {% if tab == "manufacturers" %}active{% endif %}' title='{% trans "Manufacturers" %}'>
|
||||
<a href='{% url "part-manufacturers" part.id %}'>
|
||||
<span class='menu-tab-icon fas fa-industry'></span>
|
||||
{% trans "Manufacturers" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class='list-group-item {% if tab == "suppliers" %}active{% endif %}' title='{% trans "Suppliers" %}'>
|
||||
<a href='{% url "part-suppliers" part.id %}'>
|
||||
<span class='menu-tab-icon fas fa-building'></span>
|
||||
|
@ -146,8 +146,6 @@ InvenTree | {% trans "Search Results" %}
|
||||
],
|
||||
});
|
||||
|
||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
||||
{% if manufacturer_parts.value == "True" %}
|
||||
addItem('manufacturer-part', '{% trans "Manufacturer Parts" %}', 'fa-toolbox');
|
||||
|
||||
loadManufacturerPartTable(
|
||||
@ -162,7 +160,6 @@ InvenTree | {% trans "Search Results" %}
|
||||
},
|
||||
}
|
||||
);
|
||||
{% endif %}
|
||||
|
||||
addItem('supplier-part', '{% trans "Supplier Parts" %}', 'fa-pallet');
|
||||
|
||||
|
@ -34,8 +34,6 @@
|
||||
{% include "InvenTree/settings/setting.html" with key="PART_COPY_PARAMETERS" %}
|
||||
{% include "InvenTree/settings/setting.html" with key="PART_COPY_TESTS" %}
|
||||
{% include "InvenTree/settings/setting.html" with key="PART_CATEGORY_PARAMETERS" %}
|
||||
<tr><td colspan='5'></td></tr>
|
||||
{% include "InvenTree/settings/setting.html" with key="PART_ENABLE_MANUFACTURER_PARTS" %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user