diff --git a/src/pretix/plugins/checkinlists/exporters.py b/src/pretix/plugins/checkinlists/exporters.py index d3402ccaf..e04a8b6a5 100644 --- a/src/pretix/plugins/checkinlists/exporters.py +++ b/src/pretix/plugins/checkinlists/exporters.py @@ -432,6 +432,14 @@ class CSVCheckinList(CheckInListMixin, ListExporter): headers.append(_('Seat zone')) headers.append(_('Seat row')) headers.append(_('Seat number')) + headers += [ + _('Company'), + _('Address'), + _('ZIP code'), + _('City'), + _('Country'), + pgettext('address', 'State'), + ] yield headers yield self.ProgressSetTotal(total=qs.count()) @@ -530,6 +538,14 @@ class CSVCheckinList(CheckInListMixin, ListExporter): else: row += ['', '', '', '', ''] + row += [ + op.street or '', + op.zipcode or '', + op.city or '', + op.country if op.country else '', + op.state or '', + ] + yield row def get_filename(self): diff --git a/src/tests/plugins/test_checkinlist.py b/src/tests/plugins/test_checkinlist.py index 13b834426..84c8b8024 100644 --- a/src/tests/plugins/test_checkinlist.py +++ b/src/tests/plugins/test_checkinlist.py @@ -70,11 +70,11 @@ def test_csv_simple(event): assert clean(content.decode()) == clean(""""Order code","Attendee name","Attendee name: Title","Attendee name: First name","Attendee name: Middle name","Attendee name: Family name","Product","Price","Checked in","Checked out","Automatically checked in","Secret","E-mail","Company","Voucher code","Order date","Requires special attention","Comment","Seat ID","Seat name", -"Seat zone","Seat row","Seat number" +"Seat zone","Seat row","Seat number","Company","Address","ZIP code","City","Country","State" "FOO","Mr Peter A Jones","Mr","Peter","A","Jones","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytxx", -"dummy@dummy.test","","","2019-02-22","No","","","","","","" +"dummy@dummy.test","","","2019-02-22","No","","","","","","","","","","","" "FOO","Mrs Andrea J Zulu","Mrs","Andrea","J","Zulu","Ticket","13.00","","","No","ggsngqtnmhx74jswjngw3fk8pfwz2a7k", -"dummy@dummy.test","","","2019-02-22","No","","","","","","" +"dummy@dummy.test","","","2019-02-22","No","","","","","","","","","","","" """) @@ -94,11 +94,11 @@ def test_csv_order_by_name_parts(event): # noqa assert clean(content.decode()) == clean(""""Order code","Attendee name","Attendee name: Title", "Attendee name: First name","Attendee name: Middle name","Attendee name: Family name","Product","Price", "Checked in","Checked out","Automatically checked in","Secret","E-mail","Company","Voucher code","Order date","Requires special - attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number" + attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number","Company","Address","ZIP code","City","Country","State" "FOO","Mrs Andrea J Zulu","Mrs","Andrea","J","Zulu","Ticket","13.00","","","No","ggsngqtnmhx74jswjngw3fk8pfwz2a7k", -"dummy@dummy.test","","","2019-02-22","No","","","","","","" +"dummy@dummy.test","","","2019-02-22","No","","","","","","","","","","","" "FOO","Mr Peter A Jones","Mr","Peter","A","Jones","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytxx", -"dummy@dummy.test","","","2019-02-22","No","","","","","","" +"dummy@dummy.test","","","2019-02-22","No","","","","","","","","","","","" """) c = CSVCheckinList(event) _, _, content = c.render({ @@ -111,11 +111,11 @@ def test_csv_order_by_name_parts(event): # noqa assert clean(content.decode()) == clean(""""Order code","Attendee name","Attendee name: Title", "Attendee name: First name","Attendee name: Middle name","Attendee name: Family name","Product","Price", "Checked in","Checked out","Automatically checked in","Secret","E-mail","Company","Voucher code","Order date","Requires special - attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number" + attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number","Company","Address","ZIP code","City","Country","State" "FOO","Mr Peter A Jones","Mr","Peter","A","Jones","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytxx", -"dummy@dummy.test","","","2019-02-22","No","","","","","","" +"dummy@dummy.test","","","2019-02-22","No","","","","","","","","","","","" "FOO","Mrs Andrea J Zulu","Mrs","Andrea","J","Zulu","Ticket","13.00","","","No","ggsngqtnmhx74jswjngw3fk8pfwz2a7k", -"dummy@dummy.test","","","2019-02-22","No","","","","","","" +"dummy@dummy.test","","","2019-02-22","No","","","","","","","","","","","" """) @@ -166,11 +166,11 @@ def test_csv_order_by_inherited_name_parts(event): # noqa assert clean(content.decode()) == clean(""""Order code","Attendee name","Attendee name: Title", "Attendee name: First name","Attendee name: Middle name","Attendee name: Family name","Product","Price", "Checked in","Checked out","Automatically checked in","Secret","E-mail","Company","Voucher code","Order date","Requires special - attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number" + attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number","Company","Address","ZIP code","City","Country","State" "BAR","Mr Albert J Zulu","Mr","Albert","J","Zulu","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytyy", -"dummy@dummy.test","BARCORP","","2019-02-22","No","","","","","","" +"dummy@dummy.test","BARCORP","","2019-02-22","No","","","","","","","","","","","" "FOO","Mr Paul A Jones","Mr","Paul","A","Jones","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytxx", -"dummy@dummy.test","FOOCORP","","2019-02-22","No","","","","","","" +"dummy@dummy.test","FOOCORP","","2019-02-22","No","","","","","","","","","","","" """) c = CSVCheckinList(event) _, _, content = c.render({ @@ -183,11 +183,11 @@ def test_csv_order_by_inherited_name_parts(event): # noqa assert clean(content.decode()) == clean(""""Order code","Attendee name","Attendee name: Title", "Attendee name: First name","Attendee name: Middle name","Attendee name: Family name","Product","Price", "Checked in","Checked out","Automatically checked in","Secret","E-mail","Company","Voucher code","Order date","Requires special - attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number" + attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number","Company","Address","ZIP code","City","Country","State" "BAR","Mr Albert J Zulu","Mr","Albert","J","Zulu","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytyy", -"dummy@dummy.test","BARCORP","","2019-02-22","No","","","","","","" +"dummy@dummy.test","BARCORP","","2019-02-22","No","","","","","","","","","","","" "FOO","Mr Paul A Jones","Mr","Paul","A","Jones","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytxx", -"dummy@dummy.test","FOOCORP","","2019-02-22","No","","","","","","" +"dummy@dummy.test","FOOCORP","","2019-02-22","No","","","","","","","","","","","" """) c = CSVCheckinList(event) _, _, content = c.render({ @@ -200,9 +200,9 @@ def test_csv_order_by_inherited_name_parts(event): # noqa assert clean(content.decode()) == clean(""""Order code","Attendee name","Attendee name: Title", "Attendee name: First name","Attendee name: Middle name","Attendee name: Family name","Product","Price", "Checked in","Checked out","Automatically checked in","Secret","E-mail","Company","Voucher code","Order date","Requires special - attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number" + attention","Comment","Seat ID","Seat name","Seat zone","Seat row","Seat number","Company","Address","ZIP code","City","Country","State" "FOO","Mr Paul A Jones","Mr","Paul","A","Jones","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytxx", -"dummy@dummy.test","FOOCORP","","2019-02-22","No","","","","","","" +"dummy@dummy.test","FOOCORP","","2019-02-22","No","","","","","","","","","","","" "BAR","Mr Albert J Zulu","Mr","Albert","J","Zulu","Ticket","23.00","","","No","hutjztuxhkbtwnesv2suqv26k6ttytyy", -"dummy@dummy.test","BARCORP","","2019-02-22","No","","","","","","" +"dummy@dummy.test","BARCORP","","2019-02-22","No","","","","","","","","","","","" """)