2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 04:26:44 +00:00

Allow sorting of part table by unallocated_stock

This commit is contained in:
Oliver Walters 2022-04-05 00:31:44 +10:00
parent 58003bc2cb
commit 0908aa8c8c
2 changed files with 2 additions and 1 deletions

View File

@ -1348,6 +1348,7 @@ class PartList(generics.ListCreateAPIView):
'creation_date', 'creation_date',
'IPN', 'IPN',
'in_stock', 'in_stock',
'unallocated_stock',
'category', 'category',
] ]

View File

@ -1384,7 +1384,7 @@ function loadPartTable(table, url, options={}) {
link = '?display=build-orders'; link = '?display=build-orders';
} else { } else {
// There is no available stock // There is no available stock
value = `0<span class='badge badge-right rounded-pill bg-warning'>{% trans "Not available" %}</span>`; value = `0<span class='badge badge-right rounded-pill bg-warning'>{% trans "No stock available" %}</span>`;
} }
} }
} else { } else {