mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +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,
|
'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': {
|
'REPORT_DEBUG_MODE': {
|
||||||
'name': _('Debug Mode'),
|
'name': _('Debug Mode'),
|
||||||
'description': _('Generate reports in debug mode (HTML output)'),
|
'description': _('Generate reports in debug mode (HTML output)'),
|
||||||
|
@ -13,9 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{% block details %}
|
{% block details %}
|
||||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
|
||||||
|
|
||||||
{% if manufacturer_parts.value == "True" %}
|
|
||||||
{% if roles.purchase_order.change %}
|
{% if roles.purchase_order.change %}
|
||||||
<div id='button-toolbar'>
|
<div id='button-toolbar'>
|
||||||
<div class='button-toolbar container-fluid'>
|
<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 class='table table-striped table-condensed' id='part-table' data-toolbar='#button-toolbar'>
|
||||||
</table>
|
</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 %}
|
{% endblock %}
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
|
||||||
|
|
||||||
$("#manufacturer-part-create").click(function () {
|
$("#manufacturer-part-create").click(function () {
|
||||||
launchModalForm(
|
launchModalForm(
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load inventree_extras %}
|
{% load inventree_extras %}
|
||||||
|
|
||||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
|
||||||
|
|
||||||
<ul class='list-group'>
|
<ul class='list-group'>
|
||||||
<li class='list-group-item'>
|
<li class='list-group-item'>
|
||||||
<a href='#' id='company-menu-toggle'>
|
<a href='#' id='company-menu-toggle'>
|
||||||
@ -18,7 +16,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</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" %}'>
|
<li class='list-group-item {% if tab == "manufacturer_parts" %}active{% endif %}' title='{% trans "Manufactured Parts" %}'>
|
||||||
<a href='{% url "company-detail-manufacturer-parts" company.id %}'>
|
<a href='{% url "company-detail-manufacturer-parts" company.id %}'>
|
||||||
<span class='fas fa-industry'></span>
|
<span class='fas fa-industry'></span>
|
||||||
@ -26,6 +24,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if company.is_supplier or company.is_manufacturer %}
|
{% if company.is_supplier or company.is_manufacturer %}
|
||||||
<li class='list-group-item {% if tab == "supplier_parts" %}active{% endif %}' title='{% trans "Supplied Parts" %}'>
|
<li class='list-group-item {% if tab == "supplier_parts" %}active{% endif %}' title='{% trans "Supplied Parts" %}'>
|
||||||
<a href='{% url "company-detail-supplier-parts" company.id %}'>
|
<a href='{% url "company-detail-supplier-parts" company.id %}'>
|
||||||
|
@ -12,9 +12,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block details %}
|
{% block details %}
|
||||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
|
||||||
|
|
||||||
{% if manufacturer_parts.value == "True" %}
|
|
||||||
<div id='button-toolbar'>
|
<div id='button-toolbar'>
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
<button class="btn btn-success" id='manufacturer-create'>
|
<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 class="table table-striped table-condensed" id='manufacturer-table' data-toolbar='#button-toolbar'>
|
||||||
</table>
|
</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 %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -68,16 +68,13 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% setting_object 'PART_ENABLE_MANUFACTURER_PARTS' as manufacturer_parts %}
|
|
||||||
{% if part.purchaseable and roles.purchase_order.view %}
|
{% 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" %}'>
|
<li class='list-group-item {% if tab == "manufacturers" %}active{% endif %}' title='{% trans "Manufacturers" %}'>
|
||||||
<a href='{% url "part-manufacturers" part.id %}'>
|
<a href='{% url "part-manufacturers" part.id %}'>
|
||||||
<span class='menu-tab-icon fas fa-industry'></span>
|
<span class='menu-tab-icon fas fa-industry'></span>
|
||||||
{% trans "Manufacturers" %}
|
{% trans "Manufacturers" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
|
||||||
<li class='list-group-item {% if tab == "suppliers" %}active{% endif %}' title='{% trans "Suppliers" %}'>
|
<li class='list-group-item {% if tab == "suppliers" %}active{% endif %}' title='{% trans "Suppliers" %}'>
|
||||||
<a href='{% url "part-suppliers" part.id %}'>
|
<a href='{% url "part-suppliers" part.id %}'>
|
||||||
<span class='menu-tab-icon fas fa-building'></span>
|
<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');
|
addItem('manufacturer-part', '{% trans "Manufacturer Parts" %}', 'fa-toolbox');
|
||||||
|
|
||||||
loadManufacturerPartTable(
|
loadManufacturerPartTable(
|
||||||
@ -162,7 +160,6 @@ InvenTree | {% trans "Search Results" %}
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
addItem('supplier-part', '{% trans "Supplier Parts" %}', 'fa-pallet');
|
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_PARAMETERS" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="PART_COPY_TESTS" %}
|
{% include "InvenTree/settings/setting.html" with key="PART_COPY_TESTS" %}
|
||||||
{% include "InvenTree/settings/setting.html" with key="PART_CATEGORY_PARAMETERS" %}
|
{% 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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user