summaryrefslogtreecommitdiff
path: root/postgresqleu/invoices
diff options
context:
space:
mode:
authorMagnus Hagander2024-11-12 09:24:39 +0000
committerMagnus Hagander2024-11-12 09:24:39 +0000
commit29c56f8ce2900d6e2411c92eeaec1d94133b06d0 (patch)
treef2cfee60f87a738468ee31bcb3b0dc5602cc1b13 /postgresqleu/invoices
parent45362d57faa5f097b2902756ca59a29183813fbd (diff)
Generate a fake payment link when previewing invoice
This way we get to see the qr code on the preview as well, even though it can of course not be used. But it helps adjusting layouts.
Diffstat (limited to 'postgresqleu/invoices')
-rw-r--r--postgresqleu/invoices/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/postgresqleu/invoices/views.py b/postgresqleu/invoices/views.py
index 66d1c771..5407d03d 100644
--- a/postgresqleu/invoices/views.py
+++ b/postgresqleu/invoices/views.py
@@ -340,6 +340,9 @@ def previewinvoice(request, invoicenum):
invoice = get_object_or_404(Invoice, pk=invoicenum)
+ # Fake a secret so we get the QR code
+ invoice.recipient_secret = 'x' * 64
+
# We assume there is no PDF yet
wrapper = InvoiceWrapper(invoice)
r = HttpResponse(content_type='application/pdf')