mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Update index page
This commit is contained in:
parent
476a1342c1
commit
ee7c3ae066
@ -255,6 +255,9 @@ class PartSerializer(InvenTreeModelSerializer):
|
|||||||
to reduce database trips.
|
to reduce database trips.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# TODO: Update the "in_stock" annotation to include stock for variants of the part
|
||||||
|
# Ref: https://github.com/inventree/InvenTree/issues/2240
|
||||||
|
|
||||||
# Annotate with the total 'in stock' quantity
|
# Annotate with the total 'in stock' quantity
|
||||||
queryset = queryset.annotate(
|
queryset = queryset.annotate(
|
||||||
in_stock=Coalesce(
|
in_stock=Coalesce(
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% if part.minimum_stock %}
|
{% if part.minimum_stock %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-less-than-equal'></span></td>
|
<td><span class='fas fa-flag'></span></td>
|
||||||
<td>{% trans "Minimum stock level" %}</td>
|
<td>{% trans "Minimum stock level" %}</td>
|
||||||
<td>{{ part.minimum_stock }}</td>
|
<td>{{ part.minimum_stock }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -139,8 +139,7 @@ loadSimplePartTable("#table-bom-validation", "{% url 'api-part-list' %}", {
|
|||||||
{% to_list setting_stock_recent setting_stock_low setting_stock_depleted setting_stock_needed as settings_list_stock %}
|
{% to_list setting_stock_recent setting_stock_low setting_stock_depleted setting_stock_needed as settings_list_stock %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if roles.stock.view and True in settings_list_stock %}
|
{% if roles.stock.view %}
|
||||||
addHeaderTitle('{% trans "Stock" %}');
|
|
||||||
|
|
||||||
{% if setting_stock_recent %}
|
{% if setting_stock_recent %}
|
||||||
addHeaderAction('recently-updated-stock', '{% trans "Recently Updated" %}', 'fa-clock');
|
addHeaderAction('recently-updated-stock', '{% trans "Recently Updated" %}', 'fa-clock');
|
||||||
@ -156,7 +155,7 @@ loadStockTable($('#table-recently-updated-stock'), {
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if setting_stock_low %}
|
{% if setting_stock_low %}
|
||||||
addHeaderAction('low-stock', '{% trans "Low Stock" %}', 'fa-shopping-cart');
|
addHeaderAction('low-stock', '{% trans "Low Stock" %}', 'fa-flag');
|
||||||
loadSimplePartTable("#table-low-stock", "{% url 'api-part-list' %}", {
|
loadSimplePartTable("#table-low-stock", "{% url 'api-part-list' %}", {
|
||||||
params: {
|
params: {
|
||||||
low_stock: true,
|
low_stock: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user