From a0f2762220c0c73839afbb044f3e60ec552b2001 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 2 Aug 2021 08:54:40 -0500 Subject: [PATCH] Highlight products not in use --- tailbone_corepos/views/corepos/products.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tailbone_corepos/views/corepos/products.py b/tailbone_corepos/views/corepos/products.py index 6574d6e..94ae9af 100644 --- a/tailbone_corepos/views/corepos/products.py +++ b/tailbone_corepos/views/corepos/products.py @@ -156,6 +156,10 @@ class ProductView(CoreOfficeMasterView): g.set_link('brand') g.set_link('description') + def grid_extra_class(self, product, i): + if not product.in_use: + return 'warning' + def get_instance_title(self, product): return "{} {}".format(product.upc, product.description)