mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +00:00
Add "external" field to StockLocation (#4377)
* Add "external" field to StockLocation - New model for field - Database migrations - Serializer / API updates - Front end tables / filters * Update API version
This commit is contained in:
@ -117,6 +117,7 @@ function stockLocationFields(options={}) {
|
||||
description: {},
|
||||
owner: {},
|
||||
structural: {},
|
||||
external: {},
|
||||
icon: {
|
||||
help_text: `{% trans "Icon (optional) - Explore all available icons on" %} <a href="https://fontawesome.com/v5/search?s=solid" target="_blank" rel="noopener noreferrer">Font Awesome</a>.`,
|
||||
placeholder: 'fas fa-box',
|
||||
@ -2491,6 +2492,24 @@ function loadStockLocationTable(table, options) {
|
||||
title: '{% trans "Stock Items" %}',
|
||||
switchable: true,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
field: 'structural',
|
||||
title: '{% trans "Structural" %}',
|
||||
switchable: true,
|
||||
sortable: false,
|
||||
formatter: function(value) {
|
||||
return yesNoLabel(value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'external',
|
||||
title: '{% trans "External" %}',
|
||||
switchable: true,
|
||||
sortable: false,
|
||||
formatter: function(value) {
|
||||
return yesNoLabel(value);
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
@ -134,6 +134,10 @@ function getAvailableTableFilters(tableKey) {
|
||||
type: 'bool',
|
||||
title: '{% trans "Structural" %}',
|
||||
},
|
||||
external: {
|
||||
type: 'bool',
|
||||
title: '{% trans "External" %}',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user