DJ1.9 compat field.related
This commit is contained in:
parent
ad2f8859c1
commit
2ae4b482f4
|
@ -98,7 +98,8 @@ class PaymentStateListFilter(SimpleListFilter):
|
||||||
|
|
||||||
def queryset(self, request, queryset):
|
def queryset(self, request, queryset):
|
||||||
# FIXME use queryset.computed_total instead of approx_total, bills.admin.BillAdmin.get_queryset
|
# FIXME use queryset.computed_total instead of approx_total, bills.admin.BillAdmin.get_queryset
|
||||||
Transaction = queryset.model.transactions.field.related.related_model
|
# Transaction = queryset.model.transactions.field.remote_field.related_model
|
||||||
|
Transaction = queryset.model.transactions.related.related_model
|
||||||
if self.value() == 'OPEN':
|
if self.value() == 'OPEN':
|
||||||
return queryset.filter(Q(is_open=True)|Q(type=queryset.model.PROFORMA))
|
return queryset.filter(Q(is_open=True)|Q(type=queryset.model.PROFORMA))
|
||||||
elif self.value() == 'PAID':
|
elif self.value() == 'PAID':
|
||||||
|
|
Loading…
Reference in New Issue