Add stocktake_date field to stock API, and to stock table

This commit is contained in:
Oliver Walters 2021-01-14 11:29:35 +11:00
parent 1316e6bf5b
commit df327d4e64
3 changed files with 7 additions and 2 deletions

View File

@ -131,8 +131,7 @@ $.fn.inventreeTable = function(options) {
// Callback when a column is changed
options.onColumnSwitch = function(field, checked) {
console.log(`${field} -> ${checked}`);
var columns = table.bootstrapTable('getVisibleColumns');
var text = visibleColumnString(columns);

View File

@ -208,6 +208,7 @@ class StockItemSerializer(InvenTreeModelSerializer):
'stale',
'status',
'status_text',
'stocktake_date',
'supplier_part',
'supplier_part_detail',
'tracking_items',

View File

@ -590,6 +590,11 @@ function loadStockTable(table, options) {
return locationDetail(row);
}
},
{
field: 'stocktake_date',
title: '{% trans "Stocktake" %}',
sortable: true,
},
{% settings_value "STOCK_ENABLE_EXPIRY" as expiry %}
{% if expiry %}
{