2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 21:45:39 +00:00

StockLocationEdit

This commit is contained in:
Oliver
2021-11-02 19:58:25 +11:00
parent 4c8bc9580c
commit 0d9c08b49c
5 changed files with 24 additions and 40 deletions

View File

@ -51,13 +51,14 @@
loadStockTestResultsTable,
loadStockTrackingTable,
loadTableFilters,
locationFields,
removeStockRow,
stockItemFields,
stockLocationFields,
stockStatusCodes,
*/
function locationFields() {
function stockLocationFields(options={}) {
return {
parent: {
help_text: '{% trans "Parent stock location" %}',
@ -68,6 +69,19 @@ function locationFields() {
}
/*
* Launch an API form to edit a stock location
*/
function editStockLocation(pk, options={}) {
var url = `/api/stock/location/${pk}/`;
options.fields = stockLocationFields(options);
constructForm(url, options);
}
function stockItemFields(options={}) {
var fields = {
part: {},