membershipworks: Add a model admin for event invoices
This commit is contained in:
parent
c03c5ff2f0
commit
26420ce28e
@ -115,6 +115,31 @@ class EventInstructorAdmin(admin.ModelAdmin):
|
||||
search_fields = ["name", "member__account_name"]
|
||||
|
||||
|
||||
@admin.register(EventInvoice)
|
||||
class EventInvoiceAdmin(admin.ModelAdmin):
|
||||
model = EventInvoice
|
||||
list_display = [
|
||||
"uuid",
|
||||
"event",
|
||||
"date_submitted",
|
||||
"date_paid",
|
||||
"amount",
|
||||
]
|
||||
list_filter = [
|
||||
("date_paid", admin.EmptyFieldListFilter),
|
||||
]
|
||||
show_facets = admin.ShowFacets.ALWAYS
|
||||
search_fields = [
|
||||
"uuid",
|
||||
"event__eid",
|
||||
"event__title",
|
||||
"event__url",
|
||||
"event__instructor__name",
|
||||
"event__instructor__member__account_name",
|
||||
]
|
||||
date_hierarchy = "date_submitted"
|
||||
|
||||
|
||||
class EventInvoiceInline(admin.StackedInline):
|
||||
model = EventInvoice
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user