mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Allow API filtering by "cascading" stock locations
This commit is contained in:
@ -957,6 +957,12 @@ function loadStockLocationTable(table, options) {
|
||||
switchable: true,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
field: 'pathstring',
|
||||
title: '{% trans "Path" %}',
|
||||
switchable: true,
|
||||
sortable: false,
|
||||
},
|
||||
{
|
||||
field: 'items',
|
||||
title: '{% trans "Stock Items" %}',
|
||||
|
@ -62,6 +62,28 @@ function getAvailableTableFilters(tableKey) {
|
||||
};
|
||||
}
|
||||
|
||||
// Filters for "stock location" table
|
||||
if (tableKey == "location") {
|
||||
return {
|
||||
cascade: {
|
||||
type: 'bool',
|
||||
title: '{% trans "Include sublocations" %}',
|
||||
description: '{% trans "Include locations" %}',
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Filters for "part category" table
|
||||
if (tableKey == "category") {
|
||||
return {
|
||||
cascade: {
|
||||
type: 'bool',
|
||||
title: '{% trans "Include subcategories" %}',
|
||||
description: '{% trans "Include subcategories" %}',
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Filters for the "customer stock" table (really a subset of "stock")
|
||||
if (tableKey == "customerstock") {
|
||||
return {
|
||||
|
Reference in New Issue
Block a user