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

Implement filtering which accommodates new inheritable BOM feature

- Can no longer filter bom_items by sub_part
- Adds get_used_in_filter() and get_used_in() for part model (returns a query of other part objects)
This commit is contained in:
Oliver Walters
2021-02-18 14:35:21 +11:00
parent 25ada20a19
commit 7a51e6cf78
5 changed files with 94 additions and 122 deletions

View File

@@ -133,11 +133,18 @@
<td>{% decimal on_order %}</td>
</tr>
{% endif %}
{% if required > 0 %}
{% if required_build_order_quantity > 0 %}
<tr>
<td><span class='fas fa-clipboard-list'></span></td>
<td>{% trans "Required for Orders" %}</td>
<td>{% decimal required %}
<td>{% trans "Required for Build Orders" %}</td>
<td>{% decimal required_build_order_quantity %}
</tr>
{% endif %}
{% if required_sales_order_quantity > 0 %}
<tr>
<td><span class='fas fa-clipboard-list'></span></td>
<td>{% trans "Required for Sales Orders" %}</td>
<td>{% decimal required_sales_order_quantity %}
</tr>
{% endif %}
{% if allocated > 0 %}

View File

@@ -22,10 +22,14 @@
{% block js_ready %}
{{ block.super }}
loadUsedInTable('#used-table', {
part_detail: true,
part_id: {{ part.pk }}
});
loadSimplePartTable('#used-table',
'{% url "api-part-list" %}',
{
params: {
uses: {{ part.pk }},
}
}
);
{% endblock %}