diff --git a/InvenTree/templates/js/translated/build.js b/InvenTree/templates/js/translated/build.js index 2130b4c84c..d76fd366ff 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -202,7 +202,9 @@ function createBuildOutput(build_id, options) { required: options.trackable_parts || trackable, }, batch_code: {}, - auto_allocate: {}, + auto_allocate: { + hidden: !trackable, + }, }; // Work out the next available serial numbers diff --git a/InvenTree/templates/js/translated/forms.js b/InvenTree/templates/js/translated/forms.js index a93ceb42c7..df78c939cf 100644 --- a/InvenTree/templates/js/translated/forms.js +++ b/InvenTree/templates/js/translated/forms.js @@ -2014,7 +2014,7 @@ function constructField(name, parameters, options) { if (parameters.help_text && !options.hideLabels) { // Boolean values are handled differently! - if (parameters.type != 'boolean') { + if (parameters.type != 'boolean' && !parameters.hidden) { html += constructHelpText(name, parameters, options); } } @@ -2022,7 +2022,6 @@ function constructField(name, parameters, options) { // Div for error messages html += `
`; - html += ``; // controls html += ``; // form-group @@ -2212,6 +2211,10 @@ function constructInputOptions(name, classes, type, parameters, options={}) { return ``; } else if (parameters.type == 'boolean') { + if (parameters.hidden) { + return ''; + } + var help_text = ''; if (!options.hideLabels && parameters.help_text) {