Skip to content

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

Fix displaying product price

Marcin Gębala87d5a3a20ce6
diff --git a/saleor/dashboard/product/views.py b/saleor/dashboard/product/views.py
index 29410804eb..2834930a1b 100644
--- a/saleor/dashboard/product/views.py
+++ b/saleor/dashboard/product/views.py
@@ -17,8 +17,9 @@ class ProductListView(StaffMemberOnlyMixin, ListView):
def get_queryset(self):
qs = super(ProductListView, self).get_queryset()
- qs = qs.prefetch_related('stockrecords', 'images').select_related('brand')
-
+ qs = qs.prefetch_related(
+ 'stockrecords', 'images').select_related('brand')
+ qs = qs.select_subclasses()
return qs
diff --git a/saleor/dashboard/templates/dashboard/product/list.html b/saleor/dashboard/templates/dashboard/product/list.html
index a83a1ed119..80d9925af9 100644
--- a/saleor/dashboard/templates/dashboard/product/list.html
+++ b/saleor/dashboard/templates/dashboard/product/list.html
@@ -34,7 +34,7 @@
<td><a href="{% url 'dashboard:product-update' pk=product.pk %}">{{ product.name }}</a></td>
<td><a href="#" title="Filter by this brand">{{ product.brand.name }}</a></td>
<td>{{ product.get_stock }}</td>
- {# <td>{% gross product.get_price %}</td> #}
+ <td>{% gross product.price %}</td>
</tr>
{% endfor %}
</tbody>