Replaces a bunch of reports with QuerysetReports
This commit is contained in:
parent
12b665acb8
commit
cb50f2a3be
1 changed files with 4 additions and 16 deletions
|
@ -227,23 +227,11 @@ def credit_notes(request, form):
|
||||||
"invoice__user__attendee__attendeeprofilebase",
|
"invoice__user__attendee__attendeeprofilebase",
|
||||||
)
|
)
|
||||||
|
|
||||||
headings = [
|
return QuerysetReport(
|
||||||
"id", "Owner", "Status", "Value",
|
|
||||||
]
|
|
||||||
|
|
||||||
data = []
|
|
||||||
for note in notes:
|
|
||||||
data.append([
|
|
||||||
note.id,
|
|
||||||
note.invoice.user.attendee.attendeeprofilebase.invoice_recipient(),
|
|
||||||
note.status,
|
|
||||||
note.value,
|
|
||||||
])
|
|
||||||
|
|
||||||
return ListReport(
|
|
||||||
"Credit Notes",
|
"Credit Notes",
|
||||||
headings,
|
["id", "invoice__user__attendee__attendeeprofilebase__invoice_recipient", "status", "value"], # NOQA
|
||||||
data,
|
notes,
|
||||||
|
headings=["id", "Owner", "Status", "Value"],
|
||||||
link_view=views.credit_note,
|
link_view=views.credit_note,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue