diff --git a/InvenTree/part/templates/part/stock.html b/InvenTree/part/templates/part/stock.html index 8b9561ea2e..68b89bf1b9 100644 --- a/InvenTree/part/templates/part/stock.html +++ b/InvenTree/part/templates/part/stock.html @@ -44,4 +44,29 @@ url: "{% url 'api-stock-list' %}", }); + $('#item-create').click(function () { + launchModalForm("{% url 'stock-item-create' %}", { + reload: true, + data: { + part: {{ part.id }} + }, + secondary: [ + { + field: 'part', + label: 'New Part', + title: 'Create New Part', + url: "{% url 'part-create' %}", + }, + { + field: 'location', + label: 'New Location', + title: 'Create New Location', + url: "{% url 'stock-location-create' %}", + } + ] + }); + + return false; + }); + {% endblock %} \ No newline at end of file