Skip to content

Commit 88e77b9

Browse files
authored
Merge pull request #374 from VOKO-Utrecht/373-inactieve-leveranciers-in-besteloverzichten
373 inactieve leveranciers in besteloverzichten
2 parents e30a8a7 + 9c6a09d commit 88e77b9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

webapp/ordering/admin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ def stock_product(self, obj):
171171

172172

173173
class SupplierAdmin(DeleteDisabledMixin, admin.ModelAdmin):
174-
pass
174+
list_display = ["name", "is_active"]
175+
ordering = ("name",)
176+
list_filter = ("is_active",)
175177

176178

177179
class CategoryAdmin(DeleteDisabledMixin, admin.ModelAdmin):

webapp/ordering/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def paid_orders(self):
302302
@property
303303
def orders_per_supplier(self):
304304
data = {}
305-
for supplier in Supplier.objects.all():
305+
for supplier in Supplier.objects.filter(is_active=True):
306306
suppliers_products_this_round = supplier.products.filter(order_round=self)
307307
data[supplier] = {
308308
"orderproducts": [],

0 commit comments

Comments
 (0)