2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-04 12:40:57 +00:00

Refactor StockExportOptions form

This commit is contained in:
Oliver
2021-07-19 17:23:18 +10:00
parent e7d9485c16
commit efb4f194b6
9 changed files with 71 additions and 105 deletions

View File

@ -267,16 +267,8 @@
});
$("#stock-export").click(function() {
launchModalForm("{% url 'stock-export-options' %}", {
submit_text: '{% trans "Export" %}',
success: function(response) {
var url = "{% url 'stock-export' %}";
url += "?format=" + response.format;
url += "&supplier={{ company.id }}";
location.href = url;
},
exportStock({
supplier: {{ company.id }}
});
});

View File

@ -284,18 +284,11 @@ loadStockTable($("#stock-table"), {
});
$("#stock-export").click(function() {
launchModalForm("{% url 'stock-export-options' %}", {
submit_text: '{% trans "Export" %}',
success: function(response) {
var url = "{% url 'stock-export' %}";
url += "?format=" + response.format;
url += "&cascade=" + response.cascade;
url += "&supplier_part={{ part.id }}";
location.href = url;
},
exportStock({
supplier_part: {{ part.pk }},
});
});
$("#item-create").click(function() {