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:
@ -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;
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user