Add highlight for non-active customers in grid

This commit is contained in:
Lance Edgar 2022-02-10 11:16:39 -06:00
parent 065ad9e422
commit e852613567

View file

@ -131,12 +131,20 @@ class CustomerView(MasterView):
g.set_sorter('person', model.Person.display_name)
g.set_renderer('person', self.grid_render_person)
# active_in_pos
g.filters['active_in_pos'].default_active = True
g.filters['active_in_pos'].default_verb = 'is_true'
g.set_link('id')
g.set_link('number')
g.set_link('name')
g.set_link('person')
g.set_link('email')
def grid_extra_class(self, customer, i):
if not customer.active_in_pos:
return 'warning'
def get_instance(self):
try:
instance = super(CustomerView, self).get_instance()