2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Change the manner in which active parts are filtered for BOM

- Prevented BOM from displaying for an inactive part
- Now manually filter the queryset in the form view
This commit is contained in:
Oliver Walters
2019-06-28 10:00:23 +10:00
parent ed2461adf1
commit b6a6e2dae7
5 changed files with 70 additions and 7 deletions

View File

@@ -37,7 +37,7 @@
<button class='btn btn-default' type='button' title='Import BOM data' id='bom-upload'><span class='glyphicon glyphicon-open-file'></span></button>
<button class='btn btn-default' type='button' title='New BOM Item' id='bom-item-new'><span class='glyphicon glyphicon-plus'></span></button>
<button class='btn btn-default' type='button' title='Finish Editing' id='editing-finished'><span class='glyphicon glyphicon-ok'></span></button>
{% else %}
{% elif part.active %}
<button class='btn btn-default' type='button' title='Edit BOM' id='edit-bom'><span class='glyphicon glyphicon-edit'></span></button>
{% if part.is_bom_valid == False %}
<button class='btn btn-default' id='validate-bom' type='button'><span class='glyphicon glyphicon-check'></span></button>
@@ -125,7 +125,7 @@
});
$("#edit-bom").click(function () {
location.href = "{% url 'part-bom' part.id %}?edit=True";
location.href = "{% url 'part-bom' part.id %}?edit=1";
});
$(".download-bom").click(function () {

View File

@@ -123,7 +123,7 @@
<td><b>Total Available</b></td>
<td><b>{{ part.net_stock }}</b></td>
</tr>
{% if part.assembly %}
{% if part.assembly %}
<tr>
<td colspan='2'>
<h4>Build Status</h4>