From ede4ac92198e4acd04282b688e8b028a3aec17f1 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 11 Oct 2021 10:40:03 +1100 Subject: [PATCH] Add option to BomItem form to create a new part --- InvenTree/templates/js/translated/bom.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/InvenTree/templates/js/translated/bom.js b/InvenTree/templates/js/translated/bom.js index ec37f71d15..584adc371c 100644 --- a/InvenTree/templates/js/translated/bom.js +++ b/InvenTree/templates/js/translated/bom.js @@ -35,6 +35,18 @@ function bomItemFields() { hidden: true, }, sub_part: { + secondary: { + title: '{% trans "New Part" %}', + fields: function() { + var fields = partFields(); + + // Set to a "component" part + fields.component.value = true; + + return fields; + }, + groups: partGroups(), + } }, quantity: {}, reference: {},