diff --git a/InvenTree/company/templates/company/detail.html b/InvenTree/company/templates/company/detail.html
index 4181d81b6f..e63f217f4b 100644
--- a/InvenTree/company/templates/company/detail.html
+++ b/InvenTree/company/templates/company/detail.html
@@ -45,8 +45,8 @@
{% endif %}
+ {% include "filter_list.html" with id="supplier-part" %}
- {% include "filter_list.html" with id="supplier-part" %}
{% endif %}
@@ -92,8 +92,8 @@
{% endif %}
+ {% include "filter_list.html" with id="manufacturer-part" %}
- {% include "filter_list.html" with id="supplier-part" %}
{% endif %}
@@ -169,10 +169,10 @@
- {% include "filter_list.html" with id="stock" %}
+ {% include "filter_list.html" with id="customerstock" %}
-
+
@@ -225,6 +225,7 @@
},
url: "{% url 'api-stock-list' %}",
filterKey: "customerstock",
+ filterTarget: '#filter-list-customerstock',
});
{% if company.is_customer %}
diff --git a/InvenTree/company/templates/company/index.html b/InvenTree/company/templates/company/index.html
index 1654ab04b5..d7fbee1732 100644
--- a/InvenTree/company/templates/company/index.html
+++ b/InvenTree/company/templates/company/index.html
@@ -25,6 +25,7 @@
+ {% include "filter_list.html" with id='company' %}
diff --git a/InvenTree/part/templates/part/detail.html b/InvenTree/part/templates/part/detail.html
index d16de22e1b..999a9cba63 100644
--- a/InvenTree/part/templates/part/detail.html
+++ b/InvenTree/part/templates/part/detail.html
@@ -181,6 +181,9 @@
@@ -371,6 +375,7 @@
+ {% include "filter_list.html" with id="manufacturer-part" %}
diff --git a/InvenTree/templates/attachment_table.html b/InvenTree/templates/attachment_table.html
index cbd47dd3cf..cd73e864a1 100644
--- a/InvenTree/templates/attachment_table.html
+++ b/InvenTree/templates/attachment_table.html
@@ -2,7 +2,7 @@
diff --git a/InvenTree/templates/js/translated/attachment.js b/InvenTree/templates/js/translated/attachment.js
index 5c5af5682f..44061403fa 100644
--- a/InvenTree/templates/js/translated/attachment.js
+++ b/InvenTree/templates/js/translated/attachment.js
@@ -67,6 +67,8 @@ function loadAttachmentTable(url, options) {
var table = options.table || '#attachment-table';
+ setupFilterList('attachments', $(table), '#filter-list-attachments');
+
addAttachmentButtonCallbacks(url, options.fields || {});
$(table).inventreeTable({
diff --git a/InvenTree/templates/js/translated/company.js b/InvenTree/templates/js/translated/company.js
index 4ab7a7fa3d..c92bb75d6f 100644
--- a/InvenTree/templates/js/translated/company.js
+++ b/InvenTree/templates/js/translated/company.js
@@ -380,6 +380,7 @@ function loadCompanyTable(table, url, options={}) {
url: url,
method: 'get',
queryParams: filters,
+ original: params,
groupBy: false,
sidePagination: 'server',
formatNoMatches: function() {
@@ -463,7 +464,9 @@ function loadManufacturerPartTable(table, url, options) {
filters[key] = params[key];
}
- setupFilterList('manufacturer-part', $(table));
+ var filterTarget = options.filterTarget || '#filter-list-manufacturer-part';
+
+ setupFilterList('manufacturer-part', $(table), filterTarget);
$(table).inventreeTable({
url: url,
diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js
index 7d9ba454e8..a357a965ed 100644
--- a/InvenTree/templates/js/translated/part.js
+++ b/InvenTree/templates/js/translated/part.js
@@ -621,7 +621,9 @@ function loadPartParameterTable(table, url, options) {
filters[key] = params[key];
}
- // setupFilterList("#part-parameters", $(table));
+ var filterTarget = options.filterTarget || '#filter-list-parameters';
+
+ setupFilterList('part-parameters', $(table), filterTarget);
$(table).inventreeTable({
url: url,
diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js
index 77aed29c11..988b93cad9 100644
--- a/InvenTree/templates/js/translated/stock.js
+++ b/InvenTree/templates/js/translated/stock.js
@@ -1468,7 +1468,7 @@ function loadStockTable(table, options) {
var params = options.params || {};
- var filterListElement = options.filterList || '#filter-list-stock';
+ var filterTarget = options.filterTarget || '#filter-list-stock';
var filters = {};
@@ -1484,7 +1484,7 @@ function loadStockTable(table, options) {
original[k] = params[k];
}
- setupFilterList(filterKey, table, filterListElement);
+ setupFilterList(filterKey, table, filterTarget);
// Override the default values, or add new ones
for (var key in params) {
diff --git a/InvenTree/templates/js/translated/table_filters.js b/InvenTree/templates/js/translated/table_filters.js
index 76c129abdc..d9f2014c14 100644
--- a/InvenTree/templates/js/translated/table_filters.js
+++ b/InvenTree/templates/js/translated/table_filters.js
@@ -381,6 +381,24 @@ function getAvailableTableFilters(tableKey) {
};
}
+ // Filters for "company" table
+ if (tableKey == 'company') {
+ return {
+ is_manufacturer: {
+ type: 'bool',
+ title: '{% trans "Manufacturer" %}',
+ },
+ is_supplier: {
+ type: 'bool',
+ title: '{% trans "Supplier" %}',
+ },
+ is_customer: {
+ type: 'bool',
+ title: '{% trans "Customer" %}',
+ },
+ };
+ }
+
// Filters for the "Parts" table
if (tableKey == 'parts') {
return {