2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Add "location" field

This commit is contained in:
Oliver
2021-07-11 21:07:56 +10:00
parent 3efd7f7777
commit 9eb1367d80
2 changed files with 9 additions and 2 deletions

View File

@ -132,7 +132,7 @@ function adjustStock(items, options={}) {
var buttons = `<div class='btn-group float-right' role='group'>`;
buttons += makeIconButton(
'fa-trash-alt icon-red',
'fa-times icon-red',
'button-stock-item-remove',
pk,
'{% trans "Remove stock item" %}',
@ -163,6 +163,14 @@ function adjustStock(items, options={}) {
constructFormBody({}, {
fields: {
location: {
label: '{% trans "Location" %}',
help_text: '{% trans "Select stock location" %}',
type: 'related field',
required: true,
api_url: `/api/stock/location/`,
model: 'stocklocation',
},
note: {
label: '{% trans "Notes" %}',
help_text: '{% trans "Stock transaction notes" %}',