mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
Add a "notes" field
This commit is contained in:
@ -395,10 +395,11 @@ function constructFormBody(fields, options) {
|
|||||||
|
|
||||||
for (var name in displayed_fields) {
|
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);
|
field_names.push(name);
|
||||||
} else {
|
|
||||||
|
// 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.`);
|
console.log(`WARNING: '${name}' does not match a valid field name.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,6 +162,13 @@ function adjustStock(items, options={}) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
constructFormBody({}, {
|
constructFormBody({}, {
|
||||||
|
fields: {
|
||||||
|
note: {
|
||||||
|
label: '{% trans "Notes" %}',
|
||||||
|
help_text: '{% trans "Stock transaction notes" %}',
|
||||||
|
type: 'string',
|
||||||
|
}
|
||||||
|
},
|
||||||
preFormContent: html,
|
preFormContent: html,
|
||||||
confirm: true,
|
confirm: true,
|
||||||
modal: modal,
|
modal: modal,
|
||||||
|
Reference in New Issue
Block a user