forked from CGM_Public/pretix_original
Allow to set multiple email invoice recipients (Z#23190766) (#5090)
This commit is contained in:
@@ -531,7 +531,7 @@ def send_invoices_to_organizer(sender, **kwargs):
|
||||
if i.event.settings.invoice_email_organizer:
|
||||
with language(i.event.settings.locale):
|
||||
mail(
|
||||
email=i.event.settings.invoice_email_organizer,
|
||||
email=[e.strip() for e in i.event.settings.invoice_email_organizer.split(",")],
|
||||
subject=_('New invoice: {number}').format(number=i.number),
|
||||
template=LazyI18nString.from_gettext(_(
|
||||
'Hello,\n\n'
|
||||
|
||||
@@ -71,6 +71,7 @@ from pretix.base.reldate import (
|
||||
RelativeDateField, RelativeDateTimeField, RelativeDateWrapper,
|
||||
SerializerRelativeDateField, SerializerRelativeDateTimeField,
|
||||
)
|
||||
from pretix.base.validators import multimail_validate
|
||||
from pretix.control.forms import (
|
||||
ExtFileField, FontSelect, MultipleLanguagesWidget, SingleLanguageWidget,
|
||||
)
|
||||
@@ -1233,14 +1234,18 @@ DEFAULTS = {
|
||||
'invoice_email_organizer': {
|
||||
'default': '',
|
||||
'type': str,
|
||||
'form_class': forms.EmailField,
|
||||
'serializer_class': serializers.EmailField,
|
||||
'form_class': forms.CharField,
|
||||
'serializer_class': serializers.CharField,
|
||||
'form_kwargs': dict(
|
||||
label=_("Email address to receive a copy of each invoice"),
|
||||
help_text=_("Each newly created invoice will be sent to this email address shortly after creation. You can "
|
||||
"use this for an automated import of invoices to your accounting system. The invoice will be "
|
||||
"the only attachment of the email."),
|
||||
)
|
||||
validators=[multimail_validate],
|
||||
),
|
||||
'serializer_kwargs': dict(
|
||||
validators=[multimail_validate],
|
||||
),
|
||||
},
|
||||
'show_items_outside_presale_period': {
|
||||
'default': 'True',
|
||||
|
||||
Reference in New Issue
Block a user