mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 04:55:44 +00:00
Create new stock item from supplierpart stock page
- Allow stock-item-create form to have supplierpart passed as initial data - Add some translations too
This commit is contained in:
@ -35,7 +35,7 @@
|
||||
|
||||
$("#stock-export").click(function() {
|
||||
launchModalForm("{% url 'stock-export-options' %}", {
|
||||
submit_text: "Export",
|
||||
submit_text: '{% trans "Export" %}',
|
||||
success: function(response) {
|
||||
var url = "{% url 'stock-export' %}";
|
||||
|
||||
@ -48,4 +48,25 @@
|
||||
});
|
||||
});
|
||||
|
||||
$("#item-create").click(function() {
|
||||
launchModalForm("{% url 'stock-item-create' %}", {
|
||||
reload: true,
|
||||
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' %}",
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user