diff --git a/InvenTree/company/templates/company/assigned_stock.html b/InvenTree/company/templates/company/assigned_stock.html
index 53bc79b054..392dcaa999 100644
--- a/InvenTree/company/templates/company/assigned_stock.html
+++ b/InvenTree/company/templates/company/assigned_stock.html
@@ -9,6 +9,12 @@
{% trans "Assigned Stock" %}
+
+
{% endblock %}
@@ -18,12 +24,12 @@
loadStockTable($("#stock-table"), {
params: {
- test: 7,
customer: {{ company.id }},
part_detail: true,
location_detail: true,
},
url: "{% url 'api-stock-list' %}",
+ filterKey: "customerstock",
});
{% endblock %}
\ No newline at end of file
diff --git a/InvenTree/templates/js/stock.html b/InvenTree/templates/js/stock.html
index 2600a1635d..7a92d0df39 100644
--- a/InvenTree/templates/js/stock.html
+++ b/InvenTree/templates/js/stock.html
@@ -234,9 +234,11 @@ function loadStockTable(table, options) {
var filterListElement = options.filterList || "#filter-list-stock";
var filters = {};
-
+
+ var filterKey = options.filterKey || "stock";
+
if (!options.disableFilters) {
- filters = loadTableFilters("stock");
+ filters = loadTableFilters(filterKey);
}
var original = {};
@@ -245,7 +247,7 @@ function loadStockTable(table, options) {
original[key] = params[key];
}
- setupFilterList("stock", table, filterListElement);
+ setupFilterList(filterKey, table, filterListElement);
// Override the default values, or add new ones
for (var key in params) {
diff --git a/InvenTree/templates/js/table_filters.html b/InvenTree/templates/js/table_filters.html
index 3c9381331c..e2138ef6b3 100644
--- a/InvenTree/templates/js/table_filters.html
+++ b/InvenTree/templates/js/table_filters.html
@@ -11,6 +11,24 @@ function getAvailableTableFilters(tableKey) {
tableKey = tableKey.toLowerCase();
+ // Filters for the "customer stock" table (really a subset of "stock")
+ if (tableKey == "customerstock") {
+ return {
+ serialized: {
+ type: 'bool',
+ title: '{% trans "Is Serialized" %}',
+ },
+ serial_gte: {
+ title: "{% trans "Serial number GTE" %}",
+ description: "{% trans "Serial number greater than or equal to" %}"
+ },
+ serial_lte: {
+ title: "{% trans "Serial number LTE" %}",
+ description: "{% trans "Serial number less than or equal to" %}",
+ },
+ };
+ }
+
// Filters for the "Stock" table
if (tableKey == 'stock') {
return {
@@ -39,6 +57,10 @@ function getAvailableTableFilters(tableKey) {
title: '{% trans "Is allocated" %}',
description: '{% trans "Item has been alloacted" %}',
},
+ serialized: {
+ type: 'bool',
+ title: '{% trans "Is Serialized" %}',
+ },
serial_gte: {
title: "{% trans "Serial number GTE" %}",
description: "{% trans "Serial number greater than or equal to" %}"