mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-16 01:36:29 +00:00
Implement structural stock locations (#3949)
* Implement structural stock locations * Bumped API version
This commit is contained in:
@@ -80,6 +80,9 @@ function serializeStockItem(pk, options={}) {
|
||||
},
|
||||
destination: {
|
||||
icon: 'fa-sitemap',
|
||||
filters: {
|
||||
structural: false,
|
||||
}
|
||||
},
|
||||
notes: {},
|
||||
};
|
||||
@@ -114,6 +117,7 @@ function stockLocationFields(options={}) {
|
||||
name: {},
|
||||
description: {},
|
||||
owner: {},
|
||||
structural: {},
|
||||
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',
|
||||
@@ -280,6 +284,9 @@ function stockItemFields(options={}) {
|
||||
},
|
||||
location: {
|
||||
icon: 'fa-sitemap',
|
||||
filters: {
|
||||
structural: false,
|
||||
},
|
||||
},
|
||||
quantity: {
|
||||
help_text: '{% trans "Enter initial quantity for this stock item" %}',
|
||||
@@ -838,6 +845,9 @@ function mergeStockItems(items, options={}) {
|
||||
location: {
|
||||
value: location,
|
||||
icon: 'fa-sitemap',
|
||||
filters: {
|
||||
structural: false,
|
||||
}
|
||||
},
|
||||
notes: {},
|
||||
allow_mismatched_suppliers: {},
|
||||
@@ -1106,7 +1116,11 @@ function adjustStock(action, items, options={}) {
|
||||
var extraFields = {};
|
||||
|
||||
if (specifyLocation) {
|
||||
extraFields.location = {};
|
||||
extraFields.location = {
|
||||
filters: {
|
||||
structural: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
if (action != 'delete') {
|
||||
@@ -2810,6 +2824,9 @@ function uninstallStockItem(installed_item_id, options={}) {
|
||||
fields: {
|
||||
location: {
|
||||
icon: 'fa-sitemap',
|
||||
filters: {
|
||||
structural: false,
|
||||
}
|
||||
},
|
||||
note: {},
|
||||
},
|
||||
|
Reference in New Issue
Block a user