Check-in list export: Fall back to invoice address (Z#23133171) (#3650)

This commit is contained in:
Richard Schreiber
2023-10-17 13:40:50 +02:00
committed by GitHub
parent 4d75c568b5
commit abfd8a7d86

View File

@@ -628,11 +628,17 @@ class CSVCheckinList(CheckInListMixin, ListExporter):
_('Yes') if op.blocked else '',
date_format(op.valid_from, 'SHORT_DATETIME_FORMAT') if op.valid_from else '',
date_format(op.valid_until, 'SHORT_DATETIME_FORMAT') if op.valid_until else '',
op.street or '',
op.zipcode or '',
op.city or '',
op.country if op.country else '',
op.state or '',
]
if (op.street or op.zipcode or op.city):
address = op
else:
address = ia
row += [
address.street or '',
address.zipcode or '',
address.city or '',
address.country if address.country else '',
address.state or '',
]
yield row