Compare commits

..

12 Commits

Author SHA1 Message Date
Raphael Michel
34d1d3fa6e Bump to 2023.7.1 2023-09-11 09:58:10 +02:00
Raphael Michel
ccdce2ccb8 Fix incorrect handling of boolean configuration flags 2023-09-11 09:57:37 +02:00
Raphael Michel
6d834762c4 Bump to 2023.7.0 2023-07-28 09:29:07 +02:00
Raphael Michel
4f1e9a31c6 Translations: Update German (informal) (de_Informal)
Currently translated at 100.0% (5400 of 5400 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/de_Informal/

powered by weblate
2023-07-27 14:17:58 +02:00
Raphael Michel
8ed3911dfb Translations: Update German
Currently translated at 100.0% (5400 of 5400 strings)

Translation: pretix/pretix
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix/de/

powered by weblate
2023-07-27 14:17:58 +02:00
Raphael Michel
4562879cb2 Update po files
[CI skip]

Signed-off-by: Raphael Michel <michel@rami.io>
2023-07-27 13:50:15 +02:00
Raphael Michel
ef0024b2ef Payment deadline delay: Respect week days 2023-07-27 13:49:31 +02:00
Raphael Michel
8e603410fa Update po files
[CI skip]

Signed-off-by: Raphael Michel <michel@rami.io>
2023-07-27 10:38:23 +02:00
Raphael Michel
16691ca2f6 Prevent 65ecdc184 clashing with forms that have a field called template 2023-07-26 19:18:53 +02:00
Raphael Michel
d7e70fd0b9 Order change: Do not expose internal name 2023-07-26 15:41:15 +02:00
Raphael Michel
071a3e2c9b PDF layouts: Allow negative numbers in JSON schema 2023-07-26 15:41:15 +02:00
Raphael Michel
1733c383b3 Docs: Add description of NFC support (#3494)
* Add documentation on NFC support

* Add a .

* Update doc/development/nfc/uid.rst

Co-authored-by: robbi5 <richt@rami.io>

---------

Co-authored-by: robbi5 <richt@rami.io>
2023-07-26 13:26:00 +02:00
52 changed files with 12251 additions and 11539 deletions

View File

@@ -19,4 +19,4 @@
# You should have received a copy of the GNU Affero General Public License along with this program. If not, see
# <https://www.gnu.org/licenses/>.
#
__version__ = "2023.7.0.dev0"
__version__ = "2023.7.1"

View File

@@ -907,6 +907,11 @@ class Order(LockModel, LoggedModel):
return self.expires
expires = self.expires.date() + timedelta(days=delay)
if self.event.settings.get('payment_term_weekdays'):
if expires.weekday() == 5:
expires += timedelta(days=2)
elif expires.weekday() == 6:
expires += timedelta(days=1)
tz = ZoneInfo(self.event.settings.timezone)
expires = make_aware(datetime.combine(

View File

@@ -941,9 +941,9 @@ DEFAULTS = {
'form_kwargs': dict(
label=_('Expiration delay'),
help_text=_("The order will only actually expire this many days after the expiration date communicated "
"to the customer. However, this will not delay beyond the \"last date of payments\" "
"configured above, which is always enforced. The delay may also end on a weekend regardless "
"of the other settings above."),
"to the customer. If you select \"Only end payment terms on weekdays\" above, this will also "
"be respected. However, this will not delay beyond the \"last date of payments\" "
"configured above, which is always enforced."),
# Every order in between the official expiry date and the delayed expiry date has a performance penalty
# for the cron job, so we limit this feature to 30 days to prevent arbitrary numbers of orders needing
# to be checked.

View File

@@ -187,7 +187,7 @@
{% endif %}
{% for f in plugin_forms %}
{% if f.is_layouts and not f.title %}
{% if f.template %}
{% if f.template and not "template" in f.fields %}
{% include f.template with form=f %}
{% else %}
{% bootstrap_form f layout="control" %}
@@ -261,7 +261,7 @@
{% bootstrap_field form.show_quota_left layout="control" %}
{% for f in plugin_forms %}
{% if not f.is_layouts and not f.title %}
{% if f.template %}
{% if f.template and not "template" in f.fields %}
{% include f.template with form=f %}
{% else %}
{% bootstrap_form f layout="control" %}
@@ -273,7 +273,7 @@
{% if not f.is_layouts and f.title %}
<fieldset>
<legend>{{ f.title }}</legend>
{% if f.template %}
{% if f.template and not "template" in f.fields %}
{% include f.template with form=f %}
{% else %}
{% bootstrap_form f layout="control" %}

View File

@@ -783,8 +783,8 @@ class MailSettingsRendererPreview(MailSettingsPreview):
return ctx
def get(self, request, *args, **kwargs):
v = str(request.event.settings.mail_text_order_placed)
v = format_map(v, self.placeholders('mail_text_order_placed'))
v = str(request.event.settings.mail_text_order_payment_failed)
v = format_map(v, self.placeholders('mail_text_order_payment_failed'))
renderers = request.event.get_html_mail_renderers()
if request.GET.get('renderer') in renderers:
with rolledback_transaction():

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-21 13:02+0000\n"
"POT-Creation-Date: 2023-07-27 11:50+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -5,9 +5,9 @@
<div class="panel panel-default items">
<div class="panel-heading">
<h3 class="panel-title">
<strong>{{ position.item }}</strong>
<strong>{{ position.item.name }}</strong>
{% if position.variation %}
{{ position.variation }}
{{ position.variation.value }}
{% endif %}
</h3>
</div>

View File

@@ -188,13 +188,13 @@ if SITE_URL.endswith('/'):
CSRF_TRUSTED_ORIGINS = [urlparse(SITE_URL).scheme + '://' + urlparse(SITE_URL).hostname]
TRUST_X_FORWARDED_FOR = config.get('pretix', 'trust_x_forwarded_for', fallback=False)
USE_X_FORWARDED_HOST = config.get('pretix', 'trust_x_forwarded_host', fallback=False)
TRUST_X_FORWARDED_FOR = config.getboolean('pretix', 'trust_x_forwarded_for', fallback=False)
USE_X_FORWARDED_HOST = config.getboolean('pretix', 'trust_x_forwarded_host', fallback=False)
REQUEST_ID_HEADER = config.get('pretix', 'request_id_header', fallback=False)
if config.get('pretix', 'trust_x_forwarded_proto', fallback=False):
if config.getboolean('pretix', 'trust_x_forwarded_proto', fallback=False):
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
PRETIX_PLUGINS_DEFAULT = config.get('pretix', 'plugins_default',

View File

@@ -31,7 +31,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -43,7 +43,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -73,7 +73,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -110,7 +110,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -122,7 +122,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -138,7 +138,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -150,7 +150,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
}
@@ -188,7 +188,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -200,7 +200,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -212,7 +212,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -247,7 +247,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -259,7 +259,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -307,7 +307,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
}
@@ -339,7 +339,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -351,7 +351,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
},
@@ -371,7 +371,7 @@
},
{
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)?$"
"pattern": "^-?[0-9]+(\\.[0-9]+)?$"
}
]
}

View File

@@ -412,6 +412,7 @@ def test_expiring_auto_disabled(event):
def test_expiring_auto_delayed(event):
event.settings.set('payment_term_expire_delay_days', 3)
event.settings.set('payment_term_last', date(2023, 7, 2))
event.settings.set('payment_term_weekdays', False)
event.settings.set('timezone', 'Europe/Berlin')
o1 = Order.objects.create(
code='FOO', event=event, email='dummy@dummy.test',
@@ -458,6 +459,21 @@ def test_expiring_auto_delayed(event):
assert o2.status == Order.STATUS_EXPIRED
@pytest.mark.django_db
def test_expiring_auto_delayed_weekdays(event):
event.settings.set('payment_term_expire_delay_days', 2)
event.settings.set('payment_term_weekdays', True)
event.settings.set('timezone', 'Europe/Berlin')
o1 = Order.objects.create(
code='FOO', event=event, email='dummy@dummy.test',
status=Order.STATUS_PENDING,
datetime=datetime(2023, 6, 22, 12, 13, 14, tzinfo=zoneinfo.ZoneInfo("Europe/Berlin")),
expires=datetime(2023, 6, 30, 23, 59, 59, tzinfo=zoneinfo.ZoneInfo("Europe/Berlin")),
total=0,
)
assert o1.payment_term_expire_date == o1.expires + timedelta(days=3)
@pytest.mark.django_db
def test_do_not_expire_if_approval_pending(event):
o1 = Order.objects.create(