2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

Fix persist buttons (#4640)

Fixes "persist form" buttons for the following models:

- Part
- PartCategory
- StockItem
- StockLocation

Closes https://github.com/inventree/InvenTree/issues/4491
This commit is contained in:
Oliver
2023-04-20 22:12:43 +10:00
committed by GitHub
parent c64ff9d569
commit 7bc4de6a92
4 changed files with 36 additions and 16 deletions

View File

@ -334,18 +334,8 @@
});
$("#cat-create").click(function() {
var fields = categoryFields();
{% if category %}
fields.parent.value = {{ category.pk }};
{% endif %}
constructForm('{% url "api-part-category-list" %}', {
fields: fields,
method: 'POST',
title: '{% trans "Create Part Category" %}',
follow: true,
createPartCategory({
{% if category %}parent: {{ category.pk }},{% endif %}
});
});