mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-14 15:41:10 +00:00
Add 'consumable' field to Part
- Indicates that a part can be used to make other parts - This is the inverse of 'buildable' - Add this field to the serializer and edit forms - Display parameter on part info page - BOM edit window only requests sub-parts that are marked as 'consumable' - Also added option to edit 'units' field for part
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Description</td>
|
||||
<td>{{ part.decription }}</td>
|
||||
<td>{{ part.description }}</td>
|
||||
</tr>
|
||||
{% if part.IPN %}
|
||||
<tr>
|
||||
@@ -44,7 +44,7 @@
|
||||
<td>Category</td>
|
||||
<td>
|
||||
{% if part.category %}
|
||||
<a href="{% url 'category-detail' part.category.id %}">{{ part.category.name }}</a>
|
||||
<a href="{% url 'category-detail' part.category.id %}">{{ part.category.pathstring }}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -70,6 +70,10 @@
|
||||
<td>Buildable</td>
|
||||
<td>{% include "yesnolabel.html" with value=part.buildable %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Consumable</td>
|
||||
<td>{% include "yesnolabel.html" with value=part.consumable %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Trackable</td>
|
||||
<td>{% include "yesnolabel.html" with value=part.trackable %}</td>
|
||||
|
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<h4>Stock Status - {{ part.available_stock }} available</h4>
|
||||
<h4>Stock Status - {{ part.available_stock }}{% if part.units %} {{ part.units }} {% endif%} available</h4>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td>In Stock</td>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<li{% ifequal tab 'build' %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'part-build' part.id %}">Build<span class='badge'>{{ part.active_builds|length }}</span></a></li>
|
||||
{% endif %}
|
||||
{% if part.used_in_count > 0 %}
|
||||
{% if part.consumable or part.used_in_count > 0 %}
|
||||
<li{% ifequal tab 'used' %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'part-used-in' part.id %}">Used In{% if part.used_in_count > 0 %}<span class="badge">{{ part.used_in_count }}</span>{% endif %}</a></li>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user