Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add missing stock location dashboard filters view

Anna Siwik35951df84560
diff --git a/saleor/dashboard/product/filters.py b/saleor/dashboard/product/filters.py
index 7f674952b2..962042d9b6 100644
--- a/saleor/dashboard/product/filters.py
+++ b/saleor/dashboard/product/filters.py
@@ -123,6 +123,9 @@ class StockLocationFilter(SortedFilterSet):
'Stock location list filter label', 'Sort by'),
fields=STOCK_LOCATION_SORT_BY_FIELDS.keys(),
field_labels=STOCK_LOCATION_SORT_BY_FIELDS)
+ name = CharFilter(
+ label=pgettext_lazy('Stock location list filter label', 'Name'),
+ lookup_expr='icontains')
class Meta:
model = StockLocation
diff --git a/templates/dashboard/product/stock_location/list.html b/templates/dashboard/product/stock_location/list.html
index a2ac058a0a..9ec9f5ef6e 100644
--- a/templates/dashboard/product/stock_location/list.html
+++ b/templates/dashboard/product/stock_location/list.html
@@ -69,5 +69,8 @@
{% endif %}
{% endif %}
</div>
+ <div class="col s12 l3" id="filters">
+ {% if not is_empty %}{% filters filter_set %}{% endif %}
+ </div>
</div>
{% endblock %}