2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Merge remote-tracking branch 'upstream/master' into django-q

This commit is contained in:
Oliver Walters
2021-04-10 22:46:20 +10:00
8 changed files with 37 additions and 11 deletions

View File

@ -131,6 +131,7 @@ addHeaderAction('stock-to-build', '{% trans "Required for Build Orders" %}', 'fa
loadStockTable($('#table-recently-updated-stock'), {
params: {
part_detail: true,
ordering: "-updated",
max_results: {% settings_value "STOCK_RECENT_COUNT" %},
},

View File

@ -241,7 +241,6 @@ function loadStockTable(table, options) {
// List of user-params which override the default filters
options.params['part_detail'] = true;
options.params['location_detail'] = true;
var params = options.params || {};
@ -524,7 +523,8 @@ function loadStockTable(table, options) {
title: '{% trans "Part" %}',
sortName: 'part__name',
sortable: true,
switchable: false,
visible: params['part_detail'],
switchable: params['part_detail'],
formatter: function(value, row, index, field) {
var url = `/stock/item/${row.pk}/`;
@ -543,6 +543,8 @@ function loadStockTable(table, options) {
title: 'IPN',
sortName: 'part__IPN',
sortable: true,
visible: params['part_detail'],
switchable: params['part_detail'],
formatter: function(value, row, index, field) {
return row.part_detail.IPN;
},
@ -550,6 +552,8 @@ function loadStockTable(table, options) {
{
field: 'part_detail.description',
title: '{% trans "Description" %}',
visible: params['part_detail'],
switchable: params['part_detail'],
formatter: function(value, row, index, field) {
return row.part_detail.description;
}