From 18415c62bb0c5f3b32e41d3c1c4d42886b07d9ad Mon Sep 17 00:00:00 2001 From: Martin Gross Date: Thu, 23 Jul 2020 18:02:18 +0200 Subject: [PATCH] Cancellations now use up to date invoice issuer information and do not copy the information over from the original invoice. --- src/pretix/base/services/invoices.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pretix/base/services/invoices.py b/src/pretix/base/services/invoices.py index ed2f9ff4d..128fb66c1 100644 --- a/src/pretix/base/services/invoices.py +++ b/src/pretix/base/services/invoices.py @@ -240,6 +240,14 @@ def generate_cancellation(invoice: Invoice, trigger_pdf=True): cancellation.date = timezone.now().date() cancellation.payment_provider_text = '' cancellation.file = None + with language(invoice.locale): + cancellation.invoice_from = invoice.event.settings.get('invoice_address_from') + cancellation.invoice_from_name = invoice.event.settings.get('invoice_address_from_name') + cancellation.invoice_from_zipcode = invoice.event.settings.get('invoice_address_from_zipcode') + cancellation.invoice_from_city = invoice.event.settings.get('invoice_address_from_city') + cancellation.invoice_from_country = invoice.event.settings.get('invoice_address_from_country') + cancellation.invoice_from_tax_id = invoice.event.settings.get('invoice_address_from_tax_id') + cancellation.invoice_from_vat_id = invoice.event.settings.get('invoice_address_from_vat_id') cancellation.save() cancellation = build_cancellation(cancellation)