Bug fix for part/stock

- Re-introduce the button to create a new stock item
This commit is contained in:
Oliver Walters 2019-05-17 16:35:16 +10:00
parent 3a3662ae14
commit a2eeb7e946

View File

@ -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 %}