Highlight products not in use

This commit is contained in:
Lance Edgar 2021-08-02 08:54:40 -05:00
parent bff34758ce
commit a0f2762220

View file

@ -156,6 +156,10 @@ class ProductView(CoreOfficeMasterView):
g.set_link('brand') g.set_link('brand')
g.set_link('description') g.set_link('description')
def grid_extra_class(self, product, i):
if not product.in_use:
return 'warning'
def get_instance_title(self, product): def get_instance_title(self, product):
return "{} {}".format(product.upc, product.description) return "{} {}".format(product.upc, product.description)