From e225d3b7657ea23d447fb222353819bf1b136d48 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 7 Apr 2022 19:09:43 +1000 Subject: [PATCH] Fix action buttons in "part" table on category page --- InvenTree/part/templates/part/category.html | 13 +++++++++---- InvenTree/templates/js/translated/order.js | 2 +- InvenTree/templates/js/translated/part.js | 13 ------------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/InvenTree/part/templates/part/category.html b/InvenTree/part/templates/part/category.html index 6a61ef2fbf..8c15b6151f 100644 --- a/InvenTree/part/templates/part/category.html +++ b/InvenTree/part/templates/part/category.html @@ -169,13 +169,18 @@ {% include "filter_list.html" with id="parts" %} diff --git a/InvenTree/templates/js/translated/order.js b/InvenTree/templates/js/translated/order.js index 78f6d39ee9..6b1db9fc4c 100644 --- a/InvenTree/templates/js/translated/order.js +++ b/InvenTree/templates/js/translated/order.js @@ -481,7 +481,7 @@ function orderParts(parts_list, options={}) { var thumb = thumbnailImage(part.thumbnail || part.image); // The "quantity" field should have been provided for each part - var quantity = part.quantity || 0; + var quantity = part.quantity || 1; if (quantity < 0) { quantity = 0; diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index 08b258fdc2..f26d87653a 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -1581,19 +1581,6 @@ function loadPartTable(table, url, options={}) { printPartLabels(items); }); - - $('#multi-part-export').click(function() { - var selections = $(table).bootstrapTable('getSelections'); - - var parts = ''; - - selections.forEach(function(item) { - parts += item.pk; - parts += ','; - }); - - location.href = '/part/export/?parts=' + parts; - }); }