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

Toot toot - it's the refactor tractor!

- New function for launching a CreateStockItem form
- Wraps up the previous code improvements into a single function
- Oh, the ease!
This commit is contained in:
Oliver Walters
2020-08-27 00:08:02 +10:00
parent 4be1b2928b
commit 146dae6d43
5 changed files with 79 additions and 109 deletions

View File

@ -44,23 +44,13 @@
});
$("#item-create").click(function() {
launchModalForm("{% url 'stock-item-create' %}", {
reload: true,
createNewStockItem({
data: {
part: {{ part.part.id }},
supplier_part: {{ part.id }},
},
secondary: [
{
field: 'location',
label: '{% trans "New Location" %}',
title: '{% trans "Create New Location" %}',
url: "{% url 'stock-location-create' %}",
}
]
reload: true,
});
return false;
});