'Set default in-list-view for first 4 mandatory fields'

def set_default_in_list_view(self):

    if (not [d.fieldname for d in self.fields if d.in_list_view]):
        cnt = 0
        for d in self.fields:
            if (d.reqd and (not d.hidden) and (not (d.fieldtype == u'Table'))):
                d.in_list_view = 1
                cnt += 1
                if (cnt == 4):
                    break
