mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Bug fix for part/stock
- Re-introduce the button to create a new stock item
This commit is contained in:
parent
3a3662ae14
commit
a2eeb7e946
@ -44,4 +44,29 @@
|
|||||||
url: "{% url 'api-stock-list' %}",
|
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 %}
|
{% endblock %}
|
Loading…
Reference in New Issue
Block a user