DJ1.9 compat field.related

This commit is contained in:
Marc Aymerich 2016-04-28 11:06:07 +00:00
parent 0b126a5bf8
commit ad2f8859c1

View file

@ -98,7 +98,7 @@ class PaymentStateListFilter(SimpleListFilter):
def queryset(self, request, 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':
return queryset.filter(Q(is_open=True)|Q(type=queryset.model.PROFORMA))
elif self.value() == 'PAID':