Fix #473 -- Internal name for categories and products (#900)

* Fix #473 -- Internal name for categories and products

* fix pdf renderer
This commit is contained in:
Raphael Michel
2018-05-11 12:53:25 +02:00
committed by GitHub
parent e678b52a7e
commit edeaa1333b
30 changed files with 152 additions and 55 deletions

View File

@@ -217,7 +217,7 @@ class PDFCheckinList(ReportlabExportMixin, BaseCheckinList):
'' if op.order.status != Order.STATUS_PAID else '',
op.order.code,
name,
str(op.item.name) + (" " + str(op.variation.value) if op.variation else "") + "\n" +
str(op.item) + (" " + str(op.variation.value) if op.variation else "") + "\n" +
money_filter(op.price, self.event.currency),
]
acache = {}
@@ -310,7 +310,7 @@ class CSVCheckinList(BaseCheckinList):
row = [
op.order.code,
op.attendee_name or (op.addon_to.attendee_name if op.addon_to else ''),
str(op.item.name) + (" " + str(op.variation.value) if op.variation else ""),
str(op.item) + (" " + str(op.variation.value) if op.variation else ""),
op.price,
date_format(last_checked_in.astimezone(self.event.timezone), 'SHORT_DATETIME_FORMAT')
if last_checked_in else ''

View File

@@ -90,7 +90,7 @@ class IndexView(EventPermissionRequiredMixin, ChartContainingView, TemplateView)
.annotate(cnt=Count('id')).order_by())
}
item_names = {
i.id: str(i.name)
i.id: str(i)
for i in Item.objects.filter(event=self.request.event)
}
ctx['obp_data'] = json.dumps([