DJ1.9 compat field.related
This commit is contained in:
parent
0b126a5bf8
commit
ad2f8859c1
|
@ -98,7 +98,7 @@ 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.related.related_model
|
Transaction = queryset.model.transactions.field.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