diff --git a/src/pretix/plugins/ticketoutputpdf/signals.py b/src/pretix/plugins/ticketoutputpdf/signals.py index df0e3c03c2..c53466bd57 100644 --- a/src/pretix/plugins/ticketoutputpdf/signals.py +++ b/src/pretix/plugins/ticketoutputpdf/signals.py @@ -126,14 +126,17 @@ def pdf_logentry_object_link(sender, logentry, **kwargs): override_layout = EventPluginSignal( - providing_args=["position", "layout"] + providing_args=["layout", "position"] ) """ This signal allows you to forcefully override the ticket layout that is being used to create the ticket PDF. Use with care, as this will render any specifically by the organizer selected templates useless. -The ``position`` keyword argument will contain the ``OrderPosition`` which is being generated, the ``layout`` keyword -argument will contain the layout which has been originally selected by the system. +The ``layout`` keyword argument will contain the layout which has been originally selected by the system, the +``position`` keyword argument will contain the ``OrderPosition`` which is being generated. + +If you implement this signal and do not want to override the layout, make sure to return the ``layout`` keyword argument +which you have been passed. As with all plugin signals, the ``sender`` keyword will contain the event. """ diff --git a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py index e2dad709dc..2acec88d31 100644 --- a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py +++ b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py @@ -80,7 +80,7 @@ class PdfTicketOutput(BaseTicketOutput): with language(order.locale): for op in order.positions_with_tickets: layout = override_layout.send_chained( - order.event, 'layoutoverride', orderposition=op, layout=self.layout_map.get( + order.event, 'layout', orderposition=op, layout=self.layout_map.get( (op.item_id, order.sales_channel), self.layout_map.get( (op.item_id, 'web'), @@ -101,7 +101,7 @@ class PdfTicketOutput(BaseTicketOutput): order = op.order layout = override_layout.send_chained( - order.event, 'layoutoverride', orderposition=op, layout=self.layout_map.get( + order.event, 'layout', orderposition=op, layout=self.layout_map.get( (op.item_id, order.sales_channel), self.layout_map.get( (op.item_id, 'web'),