diff --git a/InvenTree/company/templates/company/supplier_part_stock.html b/InvenTree/company/templates/company/supplier_part_stock.html index 49a5a809c2..524c508957 100644 --- a/InvenTree/company/templates/company/supplier_part_stock.html +++ b/InvenTree/company/templates/company/supplier_part_stock.html @@ -22,7 +22,7 @@ params: { supplier_part: {{ part.id }}, location_detail: true, - part_detail: true, + part_detail: false, }, groupByField: 'location', buttons: ['#stock-options'], diff --git a/InvenTree/part/templates/part/stock.html b/InvenTree/part/templates/part/stock.html index cd4f9ab2fa..2d1385f89c 100644 --- a/InvenTree/part/templates/part/stock.html +++ b/InvenTree/part/templates/part/stock.html @@ -40,7 +40,7 @@ params: { part: {{ part.id }}, location_detail: true, - part_detail: true, + part_detail: false, }, groupByField: 'location', buttons: [ diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index b7807840c5..f7154e5fbb 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -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" %}, }, diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index 02714810e3..b163bc89f3 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -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; }