mirror of
https://github.com/pretix/pretix.git
synced 2026-05-17 17:14:04 +00:00
Revert "Invoicing: Allow plugins to add data (#5452)"
This reverts commit ccd922b7f0.
This commit is contained in:
@@ -23,7 +23,7 @@ There are multiple signals that will be sent out in the ordering cycle:
|
|||||||
|
|
||||||
.. automodule:: pretix.base.signals
|
.. automodule:: pretix.base.signals
|
||||||
:no-index:
|
:no-index:
|
||||||
:members: validate_cart, validate_cart_addons, validate_order, order_valid_if_pending, order_fee_calculation, order_paid, order_placed, order_canceled, order_reactivated, order_expired, order_expiry_changed, order_modified, order_changed, order_approved, order_denied, order_fee_type_name, allow_ticket_download, order_split, order_gracefully_delete, build_invoice_data, invoice_line_text
|
:members: validate_cart, validate_cart_addons, validate_order, order_valid_if_pending, order_fee_calculation, order_paid, order_placed, order_canceled, order_reactivated, order_expired, order_expiry_changed, order_modified, order_changed, order_approved, order_denied, order_fee_type_name, allow_ticket_download, order_split, order_gracefully_delete, invoice_line_text
|
||||||
|
|
||||||
Check-ins
|
Check-ins
|
||||||
"""""""""
|
"""""""""
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
# Generated by Django 4.2.17 on 2025-09-09 09:55
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("pretixbase", "0289_invoiceline_period"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name="invoice",
|
|
||||||
name="plugin_data",
|
|
||||||
field=models.JSONField(default=dict),
|
|
||||||
),
|
|
||||||
]
|
|
||||||
@@ -201,7 +201,6 @@ class Invoice(models.Model):
|
|||||||
transmission_info = models.JSONField(null=True, blank=True)
|
transmission_info = models.JSONField(null=True, blank=True)
|
||||||
|
|
||||||
file = models.FileField(null=True, blank=True, upload_to=invoice_filename, max_length=255)
|
file = models.FileField(null=True, blank=True, upload_to=invoice_filename, max_length=255)
|
||||||
plugin_data = models.JSONField(default=dict)
|
|
||||||
|
|
||||||
objects = ScopedManager(organizer='event__organizer')
|
objects = ScopedManager(organizer='event__organizer')
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,7 @@ from pretix.base.models.tax import EU_CURRENCIES
|
|||||||
from pretix.base.services.tasks import (
|
from pretix.base.services.tasks import (
|
||||||
TransactionAwareProfiledEventTask, TransactionAwareTask,
|
TransactionAwareProfiledEventTask, TransactionAwareTask,
|
||||||
)
|
)
|
||||||
from pretix.base.signals import (
|
from pretix.base.signals import invoice_line_text, periodic_task
|
||||||
build_invoice_data, invoice_line_text, periodic_task,
|
|
||||||
)
|
|
||||||
from pretix.celery_app import app
|
from pretix.celery_app import app
|
||||||
from pretix.helpers.database import OF_SELF, rolledback_transaction
|
from pretix.helpers.database import OF_SELF, rolledback_transaction
|
||||||
from pretix.helpers.models import modelcopy
|
from pretix.helpers.models import modelcopy
|
||||||
@@ -364,7 +362,6 @@ def build_invoice(invoice: Invoice) -> Invoice:
|
|||||||
invoice.reverse_charge = reverse_charge
|
invoice.reverse_charge = reverse_charge
|
||||||
invoice.save()
|
invoice.save()
|
||||||
|
|
||||||
build_invoice_data.send(sender=invoice.event, invoice=invoice)
|
|
||||||
return invoice
|
return invoice
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -596,18 +596,6 @@ multiple events. Receivers should return a subclass of pretix.base.exporter.Base
|
|||||||
The ``sender`` keyword argument will contain an organizer.
|
The ``sender`` keyword argument will contain an organizer.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
build_invoice_data = EventPluginSignal()
|
|
||||||
"""
|
|
||||||
Arguments: ``invoice``
|
|
||||||
|
|
||||||
This signal is sent out every time an invoice is built, after the invoice model was created
|
|
||||||
and filled and before the PDF generation task is started. You can use this to make changes
|
|
||||||
to the invoice, but we recommend to mostly use it to add content to ``Invoice.plugin_data``.
|
|
||||||
You are responsible for saving any changes to the database.
|
|
||||||
|
|
||||||
As with all event-plugin signals, the ``sender`` keyword argument will contain the event.
|
|
||||||
"""
|
|
||||||
|
|
||||||
validate_order = EventPluginSignal()
|
validate_order = EventPluginSignal()
|
||||||
"""
|
"""
|
||||||
Arguments: ``payments``, ``positions``, ``email``, ``locale``, ``invoice_address``,
|
Arguments: ``payments``, ``positions``, ``email``, ``locale``, ``invoice_address``,
|
||||||
|
|||||||
Reference in New Issue
Block a user