membershipworks: Add event start/end to EventInvoice list_display
This commit is contained in:
parent
26420ce28e
commit
229558116b
@ -121,6 +121,8 @@ class EventInvoiceAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
"uuid",
|
||||
"event",
|
||||
"_event_start",
|
||||
"_event_end",
|
||||
"date_submitted",
|
||||
"date_paid",
|
||||
"amount",
|
||||
@ -139,6 +141,14 @@ class EventInvoiceAdmin(admin.ModelAdmin):
|
||||
]
|
||||
date_hierarchy = "date_submitted"
|
||||
|
||||
@admin.display(ordering="event__start")
|
||||
def _event_start(self, obj):
|
||||
return obj.event.start
|
||||
|
||||
@admin.display(ordering="event__end")
|
||||
def _event_end(self, obj):
|
||||
return obj.event.end
|
||||
|
||||
|
||||
class EventInvoiceInline(admin.StackedInline):
|
||||
model = EventInvoice
|
||||
|
Loading…
Reference in New Issue
Block a user