mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add a "notes" field
This commit is contained in:
parent
ca5d3a57de
commit
3efd7f7777
@ -395,10 +395,11 @@ function constructFormBody(fields, options) {
|
||||
|
||||
for (var name in displayed_fields) {
|
||||
|
||||
// Only push names which are actually in the set of fields
|
||||
if (name in fields) {
|
||||
field_names.push(name);
|
||||
} else {
|
||||
field_names.push(name);
|
||||
|
||||
// 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.`);
|
||||
}
|
||||
}
|
||||
|
@ -162,6 +162,13 @@ function adjustStock(items, options={}) {
|
||||
});
|
||||
|
||||
constructFormBody({}, {
|
||||
fields: {
|
||||
note: {
|
||||
label: '{% trans "Notes" %}',
|
||||
help_text: '{% trans "Stock transaction notes" %}',
|
||||
type: 'string',
|
||||
}
|
||||
},
|
||||
preFormContent: html,
|
||||
confirm: true,
|
||||
modal: modal,
|
||||
|
Loading…
Reference in New Issue
Block a user