def queryset(self, request, queryset): if self.value(): array = [] for element in queryset: if self.value() == 'Adimplente' and remove_tags(element.status_financeiro.__call__()) == 'Adimplente': array.append(element.id) if self.value() == 'Inadimplente' and remove_tags(element.status_financeiro.__call__()) == 'Inadimplente': array.append(element.id) return queryset.filter(pk__in=array)
def queryset(self, request, queryset): if self.value(): array = [] for element in queryset: if self.value() == 'Adimplente' and remove_tags( element.status_financeiro.__call__()) == 'Adimplente': array.append(element.id) if self.value() == 'Inadimplente' and remove_tags( element.status_financeiro.__call__( )) == 'Inadimplente': array.append(element.id) return queryset.filter(pk__in=array)
def dehydrate_status_financeiro(self, fornecedor): return remove_tags(fornecedor.status_financeiro())
def dehydrate_status_financeiro(self, cliente): return remove_tags(cliente.status_financeiro())