Data model for transactional history (#2147)

This commit is contained in:
Raphael Michel
2021-10-18 17:28:58 +02:00
committed by GitHub
parent c4e71011ee
commit 8ebba9de86
19 changed files with 699 additions and 10 deletions

View File

@@ -401,6 +401,18 @@ class OrderDetail(OrderView):
}
class OrderTransactions(OrderView):
template_name = 'pretixcontrol/order/transactions.html'
permission = 'can_view_orders'
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx['transactions'] = self.order.transactions.select_related(
'item', 'variation', 'subevent'
).order_by('datetime')
return ctx
class OrderDownload(AsyncAction, OrderView):
task = generate
permission = 'can_view_orders'