mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add "location" field
This commit is contained in:
parent
3efd7f7777
commit
9eb1367d80
@ -400,7 +400,6 @@ function constructFormBody(fields, options) {
|
||||
// Field not specified in the API, but the client wishes to add it!
|
||||
if (!(name in fields)) {
|
||||
fields[name] = displayed_fields[name];
|
||||
console.log(`WARNING: '${name}' does not match a valid field name.`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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" %}',
|
||||
|
Loading…
Reference in New Issue
Block a user