def corpposstatus(user): #If we have the 'can_see_all_pos' permission, show all corp POSes. #If we do not, then only show those with manager = None if user.has_perm('POS.can_see_all_pos'): poses = CorpPOS.objects.all() else: poses = CorpPOS.objects.filter(manager=None) #Add status info and return status = add_status_info(poses) return {'posstatus': status}
def myposstatus(user): #Get list of POSes where user is the manager poses = CorpPOS.objects.filter(manager=user) #Get status information and return status = add_status_info(poses) return {'posstatus': status}