forked from CGM_Public/pretix_original
CSV exports: Subevent name and date in separate columns
This commit is contained in:
@@ -278,6 +278,8 @@ class OrderListExporter(MultiSheetListExporter):
|
|||||||
]
|
]
|
||||||
if self.event.has_subevents:
|
if self.event.has_subevents:
|
||||||
headers.append(pgettext('subevent', 'Date'))
|
headers.append(pgettext('subevent', 'Date'))
|
||||||
|
headers.append(_('Start date'))
|
||||||
|
headers.append(_('End date'))
|
||||||
headers += [
|
headers += [
|
||||||
_('Product'),
|
_('Product'),
|
||||||
_('Variation'),
|
_('Variation'),
|
||||||
@@ -323,7 +325,12 @@ class OrderListExporter(MultiSheetListExporter):
|
|||||||
order.datetime.astimezone(tz).strftime('%Y-%m-%d'),
|
order.datetime.astimezone(tz).strftime('%Y-%m-%d'),
|
||||||
]
|
]
|
||||||
if self.event.has_subevents:
|
if self.event.has_subevents:
|
||||||
row.append(op.subevent)
|
row.append(op.subevent.name)
|
||||||
|
row.append(op.subevent.date_from.astimezone(self.event.timezone).strftime('%Y-%m-%d %H:%M:%S'))
|
||||||
|
if op.subevent.date_to:
|
||||||
|
row.append(op.subevent.date_to.astimezone(self.event.timezone).strftime('%Y-%m-%d %H:%M:%S'))
|
||||||
|
else:
|
||||||
|
row.append('')
|
||||||
row += [
|
row += [
|
||||||
str(op.item),
|
str(op.item),
|
||||||
str(op.variation) if op.variation else '',
|
str(op.variation) if op.variation else '',
|
||||||
|
|||||||
@@ -339,6 +339,8 @@ class CSVCheckinList(CheckInListMixin, ListExporter):
|
|||||||
|
|
||||||
if self.event.has_subevents:
|
if self.event.has_subevents:
|
||||||
headers.append(pgettext('subevent', 'Date'))
|
headers.append(pgettext('subevent', 'Date'))
|
||||||
|
headers.append(_('Start date'))
|
||||||
|
headers.append(_('End date'))
|
||||||
|
|
||||||
for q in questions:
|
for q in questions:
|
||||||
headers.append(str(q.question))
|
headers.append(str(q.question))
|
||||||
@@ -389,7 +391,14 @@ class CSVCheckinList(CheckInListMixin, ListExporter):
|
|||||||
row.append(op.secret)
|
row.append(op.secret)
|
||||||
row.append(op.attendee_email or (op.addon_to.attendee_email if op.addon_to else '') or op.order.email or '')
|
row.append(op.attendee_email or (op.addon_to.attendee_email if op.addon_to else '') or op.order.email or '')
|
||||||
if self.event.has_subevents:
|
if self.event.has_subevents:
|
||||||
row.append(str(op.subevent))
|
row.append(str(op.subevent.name))
|
||||||
|
row.append(date_format(op.subevent.date_from.astimezone(self.event.timezone), 'SHORT_DATETIME_FORMAT'))
|
||||||
|
if op.subevent.date_to:
|
||||||
|
row.append(
|
||||||
|
date_format(op.subevent.date_to.astimezone(self.event.timezone), 'SHORT_DATETIME_FORMAT')
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
row.append('')
|
||||||
acache = {}
|
acache = {}
|
||||||
if op.addon_to:
|
if op.addon_to:
|
||||||
for a in op.addon_to.answers.all():
|
for a in op.addon_to.answers.all():
|
||||||
|
|||||||
Reference in New Issue
Block a user