mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixes for stock location forms
This commit is contained in:
parent
af18d16d98
commit
ff7a75266b
@ -426,6 +426,7 @@ class LocationSerializer(InvenTree.serializers.InvenTreeModelSerializer):
|
||||
'parent',
|
||||
'pathstring',
|
||||
'items',
|
||||
'owner',
|
||||
]
|
||||
|
||||
|
||||
|
@ -111,12 +111,17 @@ function stockLocationFields(options={}) {
|
||||
},
|
||||
name: {},
|
||||
description: {},
|
||||
owner: {},
|
||||
};
|
||||
|
||||
if (options.parent) {
|
||||
fields.parent.value = options.parent;
|
||||
}
|
||||
|
||||
if (!global_settings.STOCK_OWNERSHIP_CONTROL) {
|
||||
delete fields['owner'];
|
||||
}
|
||||
|
||||
return fields;
|
||||
}
|
||||
|
||||
@ -130,6 +135,8 @@ function editStockLocation(pk, options={}) {
|
||||
|
||||
options.fields = stockLocationFields(options);
|
||||
|
||||
options.title = '{% trans "Edit Stock Location" %}';
|
||||
|
||||
constructForm(url, options);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user