File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,9 @@ def stock_product(self, obj):
171171
172172
173173class SupplierAdmin (DeleteDisabledMixin , admin .ModelAdmin ):
174- pass
174+ list_display = ["name" , "is_active" ]
175+ ordering = ("name" ,)
176+ list_filter = ("is_active" ,)
175177
176178
177179class CategoryAdmin (DeleteDisabledMixin , admin .ModelAdmin ):
Original file line number Diff line number Diff 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" : [],
You can’t perform that action at this time.
0 commit comments