Compare commits

..

19 Commits

Author SHA1 Message Date
Raphael Michel
f25097279c Refactor validation of cart contents, fix purchase of inactive subevent (Z#23217806) 2025-12-11 17:54:41 +01:00
Raphael Michel
904aa807a3 Footer link form: Add placeholder (Z#23217115) 2025-12-10 16:49:09 +01:00
Praveen Kathirvasan
0e41353a0e Add "Pay by bank" option for UK customers via Stripe (#5648)
* Add support for 'Pay by bank (UK)' payment method via Stripe

* Add 'Pay by bank' payment provider to Stripe integration

* Enhance Stripe integration: Allow UK bank payments and update imports

* Remove UK-specific payment method options from StripePayByBank integration

* Remove some UK references

---------

Co-authored-by: Raphael Michel <michel@rami.io>
2025-12-09 13:25:52 +01:00
Raphael Michel
b895d9bbca Import large package lazily to speed up startup (#5636)
* Import large package lazily to speed up startup

* Make all jsonschema imports lazy
2025-12-09 09:52:53 +01:00
Raphael Michel
f214edaf34 Timeline: Fix incorrect string formatting (fixes #5614) (#5617) 2025-12-09 08:52:09 +01:00
Raphael Michel
165a47b593 Bank transfer: Auto-ignore all 0-valued transactions (fixes #5168) (#5620)
* Bank transfer: Auto-ignore all 0-valued transactions (fixes #5168)

* Fix failing test
2025-12-09 08:50:04 +01:00
Renne Rocha
e06f281f1e Translations: Update Portuguese (Brazil)
Currently translated at 90.3% (5575 of 6172 strings)

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

powered by weblate
2025-12-09 08:49:57 +01:00
Renne Rocha
203c7e660d Translations: Update Portuguese (Brazil)
Currently translated at 100.0% (254 of 254 strings)

Translation: pretix/pretix (JavaScript parts)
Translate-URL: https://translate.pretix.eu/projects/pretix/pretix-js/pt_BR/

powered by weblate
2025-12-09 08:49:57 +01:00
Renne Rocha
8c360b8754 Translations: Update Portuguese (Brazil)
Currently translated at 90.2% (5572 of 6172 strings)

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

powered by weblate
2025-12-09 08:49:57 +01:00
Ruud Hendrickx
90b6511d11 Translations: Update Dutch (informal) (nl_Informal)
Currently translated at 64.0% (3951 of 6172 strings)

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

powered by weblate
2025-12-09 08:49:57 +01:00
Ruud Hendrickx
bb356257cb Translations: Update Dutch
Currently translated at 96.3% (5945 of 6172 strings)

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

powered by weblate
2025-12-09 08:49:57 +01:00
sandra r
e1950e408e Translations: Update Galician
Currently translated at 15.5% (958 of 6172 strings)

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

powered by weblate
2025-12-09 08:49:57 +01:00
Yasunobu YesNo Kawaguchi
99d5722ce1 Translations: Update Japanese
Currently translated at 99.9% (6166 of 6172 strings)

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

powered by weblate
2025-12-09 08:49:57 +01:00
luelista
324eeb8d40 Fix crash when imported CSV has invalid syntax (#5702) 2025-12-09 08:09:34 +01:00
Raphael Michel
449e8dc905 Event cancel form: Add missing rich=True flag 2025-12-08 09:58:54 +01:00
Raphael Michel
c491c8232e Bank transfer: Allow dashes in event slug to be missing (Z#23216859) (#5682)
* Bank transfer: Allow dashes in event slug to be missing (Z#23216859)

* Update src/pretix/plugins/banktransfer/tasks.py

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

* Update src/pretix/plugins/banktransfer/tasks.py

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

* Apply suggestions from code review

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>

---------

Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
2025-12-05 10:54:03 +01:00
sandra r
aa02cc7968 Translations: Update Galician
Currently translated at 15.5% (961 of 6172 strings)

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

powered by weblate
2025-12-05 10:36:32 +01:00
Renne Rocha
cfa13d6b9d Translations: Update Portuguese (Brazil)
Currently translated at 90.2% (5572 of 6172 strings)

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

powered by weblate
2025-12-05 10:36:32 +01:00
Raphael Michel
af4eabc800 URL generation: Fix bug if plugins declare both event_urls and organizer_urls (#5688)
* URL generation: Fix bug if plugins declare both event_urls and organizer_urls

* Add missing file

* Add license header
2025-12-05 10:22:28 +01:00
38 changed files with 823 additions and 580 deletions

View File

@@ -3,7 +3,7 @@ name = "pretix"
dynamic = ["version"]
description = "Reinventing presales, one ticket at a time"
readme = "README.rst"
requires-python = ">=3.10"
requires-python = ">=3.9"
license = {file = "LICENSE"}
keywords = ["tickets", "web", "shop", "ecommerce"]
authors = [
@@ -22,7 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django :: 5.2",
"Framework :: Django :: 4.2",
]
dependencies = [
@@ -36,7 +36,7 @@ dependencies = [
"css-inline==0.18.*",
"defusedcsv>=1.1.0",
"dnspython==2.*",
"Django[argon2]==5.2.*",
"Django[argon2]==4.2.*,>=4.2.26",
"django-bootstrap3==25.2",
"django-compressor==4.5.1",
"django-countries==7.6.*",

View File

@@ -53,7 +53,6 @@ from django.utils.timezone import now
from django.utils.translation import gettext_lazy as _
from django_otp.models import Device
from django_scopes import scopes_disabled
from webauthn.helpers.structs import PublicKeyCredentialDescriptor
from pretix.base.i18n import language
from pretix.helpers.urls import build_absolute_uri
@@ -708,6 +707,8 @@ class U2FDevice(Device):
@property
def webauthndevice(self):
from webauthn.helpers.structs import PublicKeyCredentialDescriptor
d = json.loads(self.json_data)
return PublicKeyCredentialDescriptor(websafe_decode(d['keyHandle']))
@@ -737,6 +738,8 @@ class WebAuthnDevice(Device):
@property
def webauthndevice(self):
from webauthn.helpers.structs import PublicKeyCredentialDescriptor
return PublicKeyCredentialDescriptor(websafe_decode(self.credential_id))
@property

View File

@@ -22,7 +22,6 @@
import json
from collections import namedtuple
import jsonschema
from django.contrib.staticfiles import finders
from django.core.exceptions import ValidationError
from django.db import models
@@ -38,6 +37,8 @@ from pretix.base.models import Event, Item, LoggedModel, Organizer, SubEvent
@deconstructible
class SeatingPlanLayoutValidator:
def __call__(self, value):
import jsonschema
if not isinstance(value, dict):
try:
val = json.loads(value)

View File

@@ -23,7 +23,6 @@ import json
from decimal import Decimal
from typing import Optional
import jsonschema
from django.contrib.staticfiles import finders
from django.core.exceptions import ValidationError
from django.core.validators import MaxValueValidator, MinValueValidator
@@ -298,6 +297,8 @@ def cc_to_vat_prefix(country_code):
@deconstructible
class CustomRulesValidator:
def __call__(self, value):
import jsonschema
if not isinstance(value, dict):
try:
val = json.loads(value)

View File

@@ -47,7 +47,6 @@ from collections import OrderedDict, defaultdict
from functools import partial
from io import BytesIO
import jsonschema
import pypdf
import pypdf.generic
import reportlab.rl_config
@@ -1311,6 +1310,8 @@ def _correct_page_media_box(page: pypdf.PageObject):
@deconstructible
class PdfLayoutValidator:
def __call__(self, value):
import jsonschema
if not isinstance(value, dict):
try:
val = json.loads(value)

View File

@@ -97,6 +97,10 @@ class CartError(Exception):
super().__init__(msg)
class CartPositionError(CartError):
pass
error_messages = {
'busy': gettext_lazy(
'We were not able to process your request completely as the '
@@ -106,6 +110,9 @@ error_messages = {
'unknown_position': gettext_lazy('Unknown cart position.'),
'subevent_required': pgettext_lazy('subevent', 'No date was specified.'),
'not_for_sale': gettext_lazy('You selected a product which is not available for sale.'),
'positions_removed': gettext_lazy(
'Some products have can no longer be purchased and have been removed from your cart for the following reason: %s'
),
'unavailable': gettext_lazy(
'Some of the products you selected are no longer available. '
'Please see below for details.'
@@ -258,6 +265,138 @@ def _get_voucher_availability(event, voucher_use_diff, now_dt, exclude_position_
return vouchers_ok, _voucher_depend_on_cart
def _check_position_constraints(
event: Event, item: Item, variation: ItemVariation, voucher: Voucher, subevent: SubEvent,
seat: Seat, sales_channel: SalesChannel, already_in_cart: bool, cart_is_expired: bool, real_now_dt: datetime,
item_requires_seat: bool, is_addon: bool, is_bundled: bool,
):
"""
Checks if a cart position with the given constraints can still be sold. This checks configuration and time-based
constraints of item, subevent, and voucher.
It does NOT
- check if quota/voucher/seat are still available
- check prices
- check memberships
- perform any checks that go beyond the single line (like item.max_per_order)
"""
time_machine_now_dt = time_machine_now(real_now_dt)
# Item or variation disabled
# Item disabled or unavailable by time
if not item.is_available(time_machine_now_dt) or (variation and not variation.is_available(time_machine_now_dt)):
raise CartPositionError(error_messages['unavailable'])
# Invalid media policy for online sale
if item.media_policy in (Item.MEDIA_POLICY_NEW, Item.MEDIA_POLICY_REUSE_OR_NEW):
mt = MEDIA_TYPES[item.media_type]
if not mt.medium_created_by_server:
raise CartPositionError(error_messages['media_usage_not_implemented'])
elif item.media_policy == Item.MEDIA_POLICY_REUSE:
raise CartPositionError(error_messages['media_usage_not_implemented'])
# Item removed from sales channel
if not item.all_sales_channels:
if sales_channel.identifier not in (s.identifier for s in item.limit_sales_channels.all()):
raise CartPositionError(error_messages['unavailable'])
# Variation removed from sales channel
if variation and not variation.all_sales_channels:
if sales_channel.identifier not in (s.identifier for s in variation.limit_sales_channels.all()):
raise CartPositionError(error_messages['unavailable'])
# Item disabled or unavailable by time in subevent
if subevent and item.pk in subevent.item_overrides and not subevent.item_overrides[item.pk].is_available(time_machine_now_dt):
raise CartPositionError(error_messages['not_for_sale'])
# Variation disabled or unavailable by time in subevent
if subevent and variation and variation.pk in subevent.var_overrides and \
not subevent.var_overrides[variation.pk].is_available(time_machine_now_dt):
raise CartPositionError(error_messages['not_for_sale'])
# Item requires a variation (should never happen)
if item.has_variations and not variation:
raise CartPositionError(error_messages['not_for_sale'])
# Variation belongs to wrong item (should never happen)
if variation and variation.item_id != item.pk:
raise CartPositionError(error_messages['not_for_sale'])
# Voucher does not apply to product
if voucher and not voucher.applies_to(item, variation):
raise CartPositionError(error_messages['voucher_invalid_item'])
# Voucher does not apply to seat
if voucher and voucher.seat and voucher.seat != seat:
raise CartPositionError(error_messages['voucher_invalid_seat'])
# Voucher does not apply to subevent
if voucher and voucher.subevent_id and voucher.subevent_id != subevent.pk:
raise CartPositionError(error_messages['voucher_invalid_subevent'])
# Voucher expired
if voucher and voucher.valid_until and voucher.valid_until < time_machine_now_dt:
raise CartPositionError(error_messages['voucher_expired'])
# Subevent has been disabled
if subevent and not subevent.active:
raise CartPositionError(error_messages['inactive_subevent'])
# Subevent sale not started
if subevent and subevent.presale_start and time_machine_now_dt < subevent.presale_start:
raise CartPositionError(error_messages['not_started'])
# Subevent sale has ended
if subevent and subevent.presale_has_ended:
raise CartPositionError(error_messages['ended'])
# Payment for subevent no longer possible
if subevent:
tlv = event.settings.get('payment_term_last', as_type=RelativeDateWrapper)
if tlv:
term_last = make_aware(datetime.combine(
tlv.datetime(subevent).date(),
time(hour=23, minute=59, second=59)
), event.timezone)
if term_last < time_machine_now_dt:
raise CartPositionError(error_messages['payment_ended'])
# Seat required but no seat given
if item_requires_seat and not seat:
raise CartPositionError(error_messages['seat_invalid'])
# Seat given but no seat required
if seat and not item_requires_seat:
raise CartPositionError(error_messages['seat_forbidden'])
# Item requires to be add-on but is top-level position
if item.category and item.category.is_addon and not is_addon:
raise CartPositionError(error_messages['addon_only'])
# Item requires bundling but is top-level position
if item.require_bundling and not is_bundled:
raise CartPositionError(error_messages['bundled_only'])
# Seat for wrong product
if seat and seat.product != item:
raise CartPositionError(error_messages['seat_invalid'])
# Seat blocked
if seat and seat.blocked and sales_channel.identifier not in event.settings.seating_allow_blocked_seats_for_channel:
raise CartPositionError(error_messages['seat_invalid'])
# Item requires voucher but no voucher given
if item.require_voucher and voucher is None and not is_bundled:
raise CartPositionError(error_messages['voucher_required'])
# Item or variation is hidden without voucher but no voucher is given
if (
(item.hide_without_voucher or (variation and variation.hide_without_voucher)) and
(voucher is None or not voucher.show_hidden_items) and
not is_bundled
):
raise CartPositionError(error_messages['voucher_required'])
class CartManager:
AddOperation = namedtuple('AddOperation', ('count', 'item', 'variation', 'voucher', 'quotas',
'addon_to', 'subevent', 'bundled', 'seat', 'listed_price',
@@ -294,6 +433,7 @@ class CartManager:
self._widget_data = widget_data or {}
self._sales_channel = sales_channel
self.num_extended_positions = 0
self.price_change_for_extended = False
if reservation_time:
self._reservation_time = reservation_time
@@ -421,14 +561,14 @@ class CartManager:
if cartsize > limit:
raise CartError(error_messages['max_items'] % limit)
def _check_item_constraints(self, op, current_ops=[]):
def _check_item_constraints(self, op):
if isinstance(op, (self.AddOperation, self.ExtendOperation)):
if not (
(isinstance(op, self.AddOperation) and op.addon_to == 'FAKE') or
(isinstance(op, self.ExtendOperation) and op.position.is_bundled)
):
if op.item.require_voucher and op.voucher is None:
if getattr(op, 'voucher_ignored', False):
if getattr(op, 'voucher_ignored', False): # todo??
raise CartError(error_messages['voucher_redeemed'])
raise CartError(error_messages['voucher_required'])
@@ -440,88 +580,39 @@ class CartManager:
raise CartError(error_messages['voucher_redeemed'])
raise CartError(error_messages['voucher_required'])
if not op.item.is_available() or (op.variation and not op.variation.is_available()):
raise CartError(error_messages['unavailable'])
if op.item.media_policy in (Item.MEDIA_POLICY_NEW, Item.MEDIA_POLICY_REUSE_OR_NEW):
mt = MEDIA_TYPES[op.item.media_type]
if not mt.medium_created_by_server:
raise CartError(error_messages['media_usage_not_implemented'])
elif op.item.media_policy == Item.MEDIA_POLICY_REUSE:
raise CartError(error_messages['media_usage_not_implemented'])
if not op.item.all_sales_channels:
if self._sales_channel.identifier not in (s.identifier for s in op.item.limit_sales_channels.all()):
raise CartError(error_messages['unavailable'])
if op.variation and not op.variation.all_sales_channels:
if self._sales_channel.identifier not in (s.identifier for s in op.variation.limit_sales_channels.all()):
raise CartError(error_messages['unavailable'])
if op.subevent and op.item.pk in op.subevent.item_overrides and not op.subevent.item_overrides[op.item.pk].is_available():
raise CartError(error_messages['not_for_sale'])
if op.subevent and op.variation and op.variation.pk in op.subevent.var_overrides and \
not op.subevent.var_overrides[op.variation.pk].is_available():
raise CartError(error_messages['not_for_sale'])
if op.item.has_variations and not op.variation:
raise CartError(error_messages['not_for_sale'])
if op.variation and op.variation.item_id != op.item.pk:
raise CartError(error_messages['not_for_sale'])
if op.voucher and not op.voucher.applies_to(op.item, op.variation):
raise CartError(error_messages['voucher_invalid_item'])
if op.voucher and op.voucher.seat and op.voucher.seat != op.seat:
raise CartError(error_messages['voucher_invalid_seat'])
if op.voucher and op.voucher.subevent_id and op.voucher.subevent_id != op.subevent.pk:
raise CartError(error_messages['voucher_invalid_subevent'])
if op.subevent and not op.subevent.active:
raise CartError(error_messages['inactive_subevent'])
if op.subevent and op.subevent.presale_start and time_machine_now(self.real_now_dt) < op.subevent.presale_start:
raise CartError(error_messages['not_started'])
if op.subevent and op.subevent.presale_has_ended:
raise CartError(error_messages['ended'])
seated = self._is_seated(op.item, op.subevent)
if (
seated and (
not op.seat or (
op.seat.blocked and
self._sales_channel.identifier not in self.event.settings.seating_allow_blocked_seats_for_channel
)
)
):
raise CartError(error_messages['seat_invalid'])
elif op.seat and not seated:
raise CartError(error_messages['seat_forbidden'])
elif op.seat and op.seat.product != op.item:
raise CartError(error_messages['seat_invalid'])
elif op.seat and op.count > 1:
if op.seat and op.count > 1:
raise CartError('Invalid request: A seat can only be bought once.')
if op.subevent:
tlv = self.event.settings.get('payment_term_last', as_type=RelativeDateWrapper)
if tlv:
term_last = make_aware(datetime.combine(
tlv.datetime(op.subevent).date(),
time(hour=23, minute=59, second=59)
), self.event.timezone)
if term_last < time_machine_now(self.real_now_dt):
raise CartError(error_messages['payment_ended'])
if isinstance(op, self.AddOperation):
is_addon = op.addon_to
is_bundled = op.addon_to == "FAKE"
else:
is_addon = op.position.addon_to
is_bundled = op.position.is_bundled
if isinstance(op, self.AddOperation):
if op.item.category and op.item.category.is_addon and not (op.addon_to and op.addon_to != 'FAKE'):
raise CartError(error_messages['addon_only'])
if op.item.require_bundling and not op.addon_to == 'FAKE':
raise CartError(error_messages['bundled_only'])
try:
_check_position_constraints(
event=self.event,
item=op.item,
variation=op.variation,
voucher=op.voucher,
subevent=op.subevent,
seat=op.seat,
sales_channel=self._sales_channel,
already_in_cart=isinstance(op, self.ExtendOperation),
cart_is_expired=isinstance(op, self.ExtendOperation),
real_now_dt=self.real_now_dt,
item_requires_seat=self._is_seated(op.item, op.subevent),
is_addon=is_addon,
is_bundled=is_bundled,
)
# Quota, seat, and voucher availability is checked for in perform_operations
# Price changes are checked for in extend_expired_positions
except CartPositionError as e:
if e.args[0] == error_messages['voucher_required'] and getattr(op, 'voucher_ignored', False):
# This is the case where someone clicks +1 on a voucher-only item with a fully redeemed voucher:
raise CartPositionError(error_messages['voucher_redeemed'])
raise
def _get_price(self, item: Item, variation: Optional[ItemVariation],
voucher: Optional[Voucher], custom_price: Optional[Decimal],
@@ -604,7 +695,11 @@ class CartManager:
quotas=quotas, subevent=cp.subevent, seat=cp.seat, listed_price=listed_price,
price_after_voucher=price_after_voucher,
)
self._check_item_constraints(op)
try:
self._check_item_constraints(op)
except CartPositionError as e:
self._operations.append(self.RemoveOperation(position=cp))
err = error_messages['positions_removed'] % str(e)
if cp.voucher:
self._voucher_use_diff[cp.voucher] += 2
@@ -797,7 +892,7 @@ class CartManager:
custom_price_input_is_net=False,
voucher_ignored=False,
)
self._check_item_constraints(bop, operations)
self._check_item_constraints(bop)
bundled.append(bop)
listed_price = get_listed_price(item, variation, subevent)
@@ -836,7 +931,7 @@ class CartManager:
custom_price_input_is_net=self.event.settings.display_net_prices,
voucher_ignored=voucher_ignored,
)
self._check_item_constraints(op, operations)
self._check_item_constraints(op)
operations.append(op)
self._quota_diff.update(quota_diff)
@@ -975,7 +1070,7 @@ class CartManager:
custom_price_input_is_net=self.event.settings.display_net_prices,
voucher_ignored=False,
)
self._check_item_constraints(op, operations)
self._check_item_constraints(op)
operations.append(op)
# Check constraints on the add-on combinations
@@ -1172,7 +1267,9 @@ class CartManager:
op.position.delete()
elif isinstance(op, (self.AddOperation, self.ExtendOperation)):
# Create a CartPosition for as much items as we can
if isinstance(op, self.ExtendOperation) and (op.position.pk in deleted_positions or not op.position.pk):
continue # Already deleted in other operation
# Create a CartPosition for as many items as we can
requested_count = quota_available_count = voucher_available_count = op.count
if op.seat:
@@ -1343,6 +1440,8 @@ class CartManager:
addons.delete()
op.position.delete()
elif available_count == 1:
if op.price_after_voucher != op.position.price_after_voucher:
self.price_change_for_extended = True
op.position.expires = self._expiry
op.position.max_extend = self._max_expiry_extend
op.position.listed_price = op.listed_price
@@ -1444,6 +1543,14 @@ class CartManager:
return diff
def _remove_parents_if_bundles_are_removed(self):
removed_positions = {op.position.pk for op in self._operations if isinstance(op, self.RemoveOperation)}
for op in self._operations:
if isinstance(op, self.RemoveOperation):
if op.position.is_bundled and op.position.addon_to_id not in removed_positions:
self._operations.append(self.RemoveOperation(position=op.position.addon_to))
removed_positions.add(op.position.addon_to)
def commit(self):
self._check_presale_dates()
self._check_max_cart_size()
@@ -1453,6 +1560,7 @@ class CartManager:
err = err or self._check_min_per_voucher()
self._extend_expiry_of_valid_existing_positions()
self._remove_parents_if_bundles_are_removed()
err = self._perform_operations() or err
self.recompute_final_prices_and_taxes()
@@ -1708,7 +1816,12 @@ def extend_cart_reservation(self, event: Event, cart_id: str=None, locale='en',
try:
cm = CartManager(event=event, cart_id=cart_id, sales_channel=sales_channel)
cm.commit()
return {"success": cm.num_extended_positions, "expiry": cm._expiry, "max_expiry_extend": cm._max_expiry_extend}
return {
"success": cm.num_extended_positions,
"expiry": cm._expiry,
"max_expiry_extend": cm._max_expiry_extend,
"price_changed": cm.price_change_for_extended,
}
except LockTimeoutException:
self.retry()
except (MaxRetriesExceededError, LockTimeoutException):

View File

@@ -47,7 +47,6 @@ from urllib.parse import urljoin, urlparse
from zoneinfo import ZoneInfo
import requests
from bs4 import BeautifulSoup
from celery import chain
from celery.exceptions import MaxRetriesExceededError
from django.conf import settings
@@ -764,6 +763,8 @@ def render_mail(template, context, placeholder_mode=SafeFormatter.MODE_RICH_TO_P
def replace_images_with_cid_paths(body_html):
from bs4 import BeautifulSoup
if body_html:
email = BeautifulSoup(body_html, "lxml")
cid_images = []

View File

@@ -81,7 +81,7 @@ from pretix.base.models.tax import TAXED_ZERO, TaxedPrice, TaxRule
from pretix.base.payment import GiftCardPayment, PaymentException
from pretix.base.reldate import RelativeDateWrapper
from pretix.base.secrets import assign_ticket_secret
from pretix.base.services import tickets
from pretix.base.services import cart, tickets
from pretix.base.services.invoices import (
generate_cancellation, generate_invoice, invoice_qualified,
invoice_transmission_separately, order_invoice_transmission_separately,
@@ -130,6 +130,9 @@ class OrderError(Exception):
error_messages = {
'positions_removed': gettext_lazy(
'Some products have can no longer be purchased and have been removed from your cart for the following reason: %s'
),
'unavailable': gettext_lazy(
'Some of the products you selected were no longer available. '
'Please see below for details.'
@@ -182,14 +185,6 @@ error_messages = {
'The voucher code used for one of the items in your cart is not valid for this item. We removed this item from your cart.'
),
'voucher_required': gettext_lazy('You need a valid voucher code to order one of the products.'),
'some_subevent_not_started': gettext_lazy(
'The booking period for one of the events in your cart has not yet started. The '
'affected positions have been removed from your cart.'
),
'some_subevent_ended': gettext_lazy(
'The booking period for one of the events in your cart has ended. The affected '
'positions have been removed from your cart.'
),
'seat_invalid': gettext_lazy('One of the seats in your order was invalid, we removed the position from your cart.'),
'seat_unavailable': gettext_lazy('One of the seats in your order has been taken in the meantime, we removed the position from your cart.'),
'country_blocked': gettext_lazy('One of the selected products is not available in the selected country.'),
@@ -744,13 +739,37 @@ def _check_positions(event: Event, now_dt: datetime, time_machine_now_dt: dateti
deleted_positions.add(cp.pk)
cp.delete()
sorted_positions = sorted(positions, key=lambda c: (-int(c.is_bundled), c.pk))
sorted_positions = list(sorted(positions, key=lambda c: (-int(c.is_bundled), c.pk)))
for cp in sorted_positions:
cp._cached_quotas = list(cp.quotas)
for cp in sorted_positions:
try:
cart._check_position_constraints(
event=event,
item=cp.item,
variation=cp.variation,
voucher=cp.voucher,
subevent=cp.subevent,
seat=cp.seat,
sales_channel=sales_channel,
already_in_cart=True,
cart_is_expired=cp.expires < now_dt,
real_now_dt=now_dt,
item_requires_seat=cp.requires_seat,
is_addon=bool(cp.addon_to_id),
is_bundled=bool(cp.addon_to_id) and cp.is_bundled,
)
# Quota, seat, and voucher availability is checked for below
# Prices are checked for below
# Memberships are checked in _create_order
except cart.CartPositionError as e:
err = error_messages['positions_removed'] % str(e)
delete(cp)
# Create locks
if any(cp.expires < now() + timedelta(seconds=LOCK_TRUST_WINDOW) for cp in sorted_positions):
if any(cp.expires < now() + timedelta(seconds=LOCK_TRUST_WINDOW) and cp.pk not in deleted_positions for cp in sorted_positions):
# No need to perform any locking if the cart positions still guarantee everything long enough.
full_lock_required = any(
getattr(o, 'seat', False) for o in sorted_positions
@@ -769,20 +788,17 @@ def _check_positions(event: Event, now_dt: datetime, time_machine_now_dt: dateti
# Check maximum order size
limit = min(int(event.settings.max_items_per_order), settings.PRETIX_MAX_ORDER_SIZE)
if sum(1 for cp in sorted_positions if not cp.addon_to) > limit:
if sum(1 for cp in sorted_positions if not cp.addon_to and cp.pk not in deleted_positions) > limit:
err = err or (error_messages['max_items'] % limit)
# Check availability
for i, cp in enumerate(sorted_positions):
if cp.pk in deleted_positions:
if cp.pk in deleted_positions or not cp.pk:
continue
if not cp.item.is_available() or (cp.variation and not cp.variation.is_available()):
err = err or error_messages['unavailable']
delete(cp)
continue
quotas = cp._cached_quotas
# Product per order limits
products_seen[cp.item] += 1
if cp.item.max_per_order and products_seen[cp.item] > cp.item.max_per_order:
err = error_messages['max_items_per_product'] % {
@@ -792,6 +808,7 @@ def _check_positions(event: Event, now_dt: datetime, time_machine_now_dt: dateti
delete(cp)
break
# Voucher availability
if cp.voucher:
v_usages[cp.voucher] += 1
if cp.voucher not in v_avail:
@@ -806,48 +823,14 @@ def _check_positions(event: Event, now_dt: datetime, time_machine_now_dt: dateti
delete(cp)
continue
if cp.subevent and cp.subevent.presale_start and time_machine_now_dt < cp.subevent.presale_start:
err = err or error_messages['some_subevent_not_started']
delete(cp)
break
if cp.subevent:
tlv = event.settings.get('payment_term_last', as_type=RelativeDateWrapper)
if tlv:
term_last = make_aware(datetime.combine(
tlv.datetime(cp.subevent).date(),
time(hour=23, minute=59, second=59)
), event.timezone)
if term_last < time_machine_now_dt:
err = err or error_messages['some_subevent_ended']
delete(cp)
break
if cp.subevent and cp.subevent.presale_has_ended:
err = err or error_messages['some_subevent_ended']
delete(cp)
break
if (cp.requires_seat and not cp.seat) or (cp.seat and not cp.requires_seat) or (cp.seat and cp.seat.product != cp.item) or cp.seat in seats_seen:
# Check duplicate seats in order
if cp.seat in seats_seen:
err = err or error_messages['seat_invalid']
delete(cp)
break
if cp.seat:
seats_seen.add(cp.seat)
if cp.item.require_voucher and cp.voucher is None and not cp.is_bundled:
delete(cp)
err = err or error_messages['voucher_required']
break
if (cp.item.hide_without_voucher or (cp.variation and cp.variation.hide_without_voucher)) and (
cp.voucher is None or not cp.voucher.show_hidden_items or not cp.voucher.applies_to(cp.item, cp.variation)
) and not cp.is_bundled:
delete(cp)
err = error_messages['voucher_required']
break
if cp.seat:
# Unlike quotas (which we blindly trust as long as the position is not expired), we check seats every
# time, since we absolutely can not overbook a seat.
if not cp.seat.is_available(ignore_cart=cp, ignore_voucher_id=cp.voucher_id, sales_channel=sales_channel.identifier):
@@ -855,34 +838,13 @@ def _check_positions(event: Event, now_dt: datetime, time_machine_now_dt: dateti
delete(cp)
continue
if cp.expires >= now_dt and not cp.voucher:
# Other checks are not necessary
continue
# Check useful quota configuration
if len(quotas) == 0:
err = err or error_messages['unavailable']
delete(cp)
continue
if cp.subevent and cp.item.pk in cp.subevent.item_overrides and not cp.subevent.item_overrides[cp.item.pk].is_available(time_machine_now_dt):
err = err or error_messages['unavailable']
delete(cp)
continue
if cp.subevent and cp.variation and cp.variation.pk in cp.subevent.var_overrides and \
not cp.subevent.var_overrides[cp.variation.pk].is_available(time_machine_now_dt):
err = err or error_messages['unavailable']
delete(cp)
continue
if cp.voucher:
if cp.voucher.valid_until and cp.voucher.valid_until < time_machine_now_dt:
err = err or error_messages['voucher_expired']
delete(cp)
continue
quota_ok = True
ignore_all_quotas = cp.expires >= now_dt or (
cp.voucher and (
cp.voucher.allow_ignore_quota or (cp.voucher.block_quota and cp.voucher.quota is None)

View File

@@ -60,25 +60,23 @@ def _populate_app_cache():
def get_defining_app(o):
# If sentry packed this in a wrapper, unpack that
module = getattr(o, "__module__", None)
if module and "sentry" in module:
if "sentry" in o.__module__:
o = o.__wrapped__
if hasattr(o, "__mocked_app"):
return o.__mocked_app
# Find the Django application this belongs to
searchpath = module or getattr(o.__class__, "__module__", None) or ""
searchpath = o.__module__
# Core modules are always active
if searchpath and any(searchpath.startswith(cm) for cm in settings.CORE_MODULES):
if any(searchpath.startswith(cm) for cm in settings.CORE_MODULES):
return 'CORE'
if not app_cache:
_populate_app_cache()
app = None
while searchpath:
while True:
app = app_cache.get(searchpath)
if "." not in searchpath or app:
break
@@ -159,11 +157,7 @@ class PluginSignal(Generic[T], django.dispatch.Signal):
if not app_cache:
_populate_app_cache()
for receiver in self._sorted_receivers(sender)[0]:
if self._is_receiver_active(sender, receiver):
response = receiver(signal=self, sender=sender, **named)
responses.append((receiver, response))
for receiver in self._sorted_receivers(sender)[1]:
for receiver in self._sorted_receivers(sender):
if self._is_receiver_active(sender, receiver):
response = receiver(signal=self, sender=sender, **named)
responses.append((receiver, response))
@@ -185,11 +179,7 @@ class PluginSignal(Generic[T], django.dispatch.Signal):
if not app_cache:
_populate_app_cache()
for receiver in self._sorted_receivers(sender)[0]:
if self._is_receiver_active(sender, receiver):
named[chain_kwarg_name] = response
response = receiver(signal=self, sender=sender, **named)
for receiver in self._sorted_receivers(sender)[1]:
for receiver in self._sorted_receivers(sender):
if self._is_receiver_active(sender, receiver):
named[chain_kwarg_name] = response
response = receiver(signal=self, sender=sender, **named)
@@ -214,15 +204,7 @@ class PluginSignal(Generic[T], django.dispatch.Signal):
if not app_cache:
_populate_app_cache()
for receiver in self._sorted_receivers(sender)[0]:
if self._is_receiver_active(sender, receiver):
try:
response = receiver(signal=self, sender=sender, **named)
except Exception as err:
responses.append((receiver, err))
else:
responses.append((receiver, response))
for receiver in self._sorted_receivers(sender)[1]:
for receiver in self._sorted_receivers(sender):
if self._is_receiver_active(sender, receiver):
try:
response = receiver(signal=self, sender=sender, **named)
@@ -233,33 +215,16 @@ class PluginSignal(Generic[T], django.dispatch.Signal):
return responses
def _sorted_receivers(self, sender):
orig_list_sync = self._live_receivers(sender)[0]
# todo: _live_receivers changed return value from [] to [], []
orig_list_async = self._live_receivers(sender)[1]
def _receiver_module(receiver):
return getattr(receiver, "__module__", receiver.__class__.__module__)
def _receiver_name(receiver):
return getattr(receiver, "__name__", receiver.__class__.__name__)
sorted_list_sync = sorted(
orig_list_sync,
orig_list = self._live_receivers(sender)
sorted_list = sorted(
orig_list,
key=lambda receiver: (
0 if any(_receiver_module(receiver).startswith(m) for m in settings.CORE_MODULES) else 1,
_receiver_module(receiver),
_receiver_name(receiver),
0 if any(receiver.__module__.startswith(m) for m in settings.CORE_MODULES) else 1,
receiver.__module__,
receiver.__name__,
)
)
sorted_list_async = sorted(
orig_list_async,
key=lambda receiver: (
0 if any(_receiver_module(receiver).startswith(m) for m in settings.CORE_MODULES) else 1,
_receiver_module(receiver),
_receiver_name(receiver),
)
)
return sorted_list_sync, sorted_list_async
return sorted_list
class EventPluginSignal(PluginSignal[Event]):

View File

@@ -93,7 +93,9 @@ def timeline_for_event(event, subevent=None):
description=format_lazy(
'{} ({})',
pgettext_lazy('timeline', 'End of ticket sales'),
pgettext_lazy('timeline', 'automatically because the event is over and no end of presale has been configured') if not ev.presale_end else ""
pgettext_lazy('timeline', 'automatically because the event is over and no end of presale has been configured')
) if not ev.presale_end else (
pgettext_lazy('timeline', 'End of ticket sales')
),
edit_url=ev_edit_url + '#id_presale_end_0'
))

View File

@@ -1958,6 +1958,13 @@ class EventFooterLinkForm(I18nModelForm):
class Meta:
model = EventFooterLink
fields = ('label', 'url')
widgets = {
"url": forms.URLInput(
attrs={
"placeholder": "https://..."
}
)
}
class BaseEventFooterLinkFormSet(I18nFormSetMixin, forms.BaseInlineFormSet):

View File

@@ -974,7 +974,7 @@ class EventCancelForm(FormPlaceholderMixin, forms.Form):
self._set_field_placeholders('send_subject', ['event_or_subevent', 'refund_amount', 'position_or_address',
'order', 'event'])
self._set_field_placeholders('send_message', ['event_or_subevent', 'refund_amount', 'position_or_address',
'order', 'event'])
'order', 'event'], rich=True)
self.fields['send_waitinglist_subject'] = I18nFormField(
label=_("Subject"),
required=True,
@@ -998,7 +998,7 @@ class EventCancelForm(FormPlaceholderMixin, forms.Form):
))
)
self._set_field_placeholders('send_waitinglist_subject', ['event_or_subevent', 'event'])
self._set_field_placeholders('send_waitinglist_message', ['event_or_subevent', 'event'])
self._set_field_placeholders('send_waitinglist_message', ['event_or_subevent', 'event'], rich=True)
if self.event.has_subevents:
self.fields['subevent'].queryset = self.event.subevents.all()

View File

@@ -1024,6 +1024,13 @@ class OrganizerFooterLinkForm(I18nModelForm):
class Meta:
model = OrganizerFooterLink
fields = ('label', 'url')
widgets = {
"url": forms.URLInput(
attrs={
"placeholder": "https://..."
}
)
}
class BaseOrganizerFooterLinkFormSet(I18nFormSetMixin, forms.BaseInlineFormSet):

View File

@@ -60,7 +60,6 @@ from pretix.base.models import (
)
from pretix.base.services.quotas import QuotaAvailability
from pretix.base.timeline import timeline_for_event
from pretix.control.forms.event import CommentForm
from pretix.control.signals import (
event_dashboard_widgets, user_dashboard_widgets,
)
@@ -341,6 +340,8 @@ def welcome_wizard_widget(sender, **kwargs):
def event_index(request, organizer, event):
from pretix.control.forms.event import CommentForm
subevent = None
if request.GET.get("subevent", "") != "" and request.event.has_subevents:
i = request.GET.get("subevent", "")

View File

@@ -98,7 +98,6 @@ from pretix.control.views.mailsetup import MailSettingsSetupView
from pretix.control.views.user import RecentAuthenticationRequiredMixin
from pretix.helpers.database import rolledback_transaction
from pretix.multidomain.urlreverse import build_absolute_uri, get_event_domain
from pretix.plugins.stripe.payment import StripeSettingsHolder
from pretix.presale.views.widget import (
version_default as widget_version_default,
)
@@ -1666,6 +1665,8 @@ class QuickSetupView(FormView):
'or take your event live to start selling!'))
if form.cleaned_data.get('payment_stripe__enabled', False):
from pretix.plugins.stripe.payment import StripeSettingsHolder
self.request.session['payment_stripe_oauth_enable'] = True
return redirect(StripeSettingsHolder(self.request.event).get_connect_url(self.request))

View File

@@ -156,7 +156,7 @@ class BaseProcessView(AsyncAction, FormView):
)
)
reader = parse_csv(self.file.file, 1024 * 1024, "replace", charset=charset)
if reader._had_duplicates:
if reader and reader._had_duplicates:
messages.warning(
self.request,
_(

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-27 13:57+0000\n"
"PO-Revision-Date: 2025-12-03 23:00+0000\n"
"PO-Revision-Date: 2025-12-05 18:00+0000\n"
"Last-Translator: sandra r <sandrarial@gestiontickets.online>\n"
"Language-Team: Galician <https://translate.pretix.eu/projects/pretix/pretix/"
"gl/>\n"
@@ -721,7 +721,7 @@ msgid_plural ""
msgstr[0] "O teu contrasinal non sexa o mesmo que o teu contrasinal anterior."
msgstr[1] ""
"O teu contrasinal non sexa o mesmo que un dos teus contrasinais anteriores "
"de %(history_length)."
"de %(history_length)s."
#: pretix/base/channels.py:168
msgid "Online shop"
@@ -3329,42 +3329,48 @@ msgid ""
"Upload a valid image. The file you uploaded was either not an image or a "
"corrupted image."
msgstr ""
"Carga unha imaxe válida. O ficheiro que cargaches ou non era unha imaxe ou "
"estaba danado."
#: pretix/base/forms/questions.py:653 pretix/base/forms/questions.py:662
msgid ""
"If you keep this empty, the ticket will be valid starting at the time of "
"purchase."
msgstr ""
"Se o deixas baleiro, o billete será válido a partir do momento da compra."
#: pretix/base/forms/questions.py:709 pretix/base/forms/questions.py:1102
#, fuzzy
msgid "Street and Number"
msgstr "Calle y número"
msgstr "Rúa e Número"
#: pretix/base/forms/questions.py:1166
msgid ""
"Optional, but depending on the country you reside in we might need to charge "
"you additional taxes if you do not enter it."
msgstr ""
"Opcional, pero dependendo do país no que residas, pode que teñamos que "
"cobrarche impostos adicionais se non o introduces."
#: pretix/base/forms/questions.py:1168 pretix/base/forms/questions.py:1174
msgid "If you are registered in Switzerland, you can enter your UID instead."
msgstr ""
"Se estás rexistrado/a en Suíza, podes introducir o teu UID no seu lugar."
#: pretix/base/forms/questions.py:1172
msgid ""
"Optional, but it might be required for you to claim tax benefits on your "
"invoice depending on your and the sellers country of residence."
msgstr ""
"Opcional, pero pode ser necesario para que solicites beneficios fiscais na "
"túa factura dependendo do teu país de residencia e do vendedor."
#: pretix/base/forms/questions.py:1181
#, fuzzy
msgid "No invoice requested"
msgstr "Tarifa de cancelación"
msgstr "Non se solicitou factura"
#: pretix/base/forms/questions.py:1183
msgid "Invoice transmission method"
msgstr ""
msgstr "Método de transmisión de facturas"
#: pretix/base/forms/questions.py:1329
msgid "You need to provide a company name."
@@ -3379,111 +3385,101 @@ msgid ""
"If you enter an invoice address, you also need to select an invoice "
"transmission method."
msgstr ""
"Se introduces un enderezo de facturación, tamén debes seleccionar un método "
"de transmisión da factura."
#: pretix/base/forms/questions.py:1385
#, fuzzy
msgid ""
"The selected transmission type is not available in your country or for your "
"type of address."
msgstr "El producto seleccionado no está activo o no tiene precio fijo."
msgstr ""
"O tipo de transmisión seleccionado non está dispoñible no seu país nin para "
"o seu tipo de enderezo."
#: pretix/base/forms/questions.py:1394
msgid ""
"The selected type of invoice transmission requires a field that is currently "
"not available, please reach out to the organizer."
msgstr ""
"O tipo de transmisión de factura seleccionado require un campo que non está "
"dispoñible actualmente. Ponte en contacto co organizador."
#: pretix/base/forms/questions.py:1398
msgid "This field is required for the selected type of invoice transmission."
msgstr ""
"Este campo é obrigatorio para o tipo de transmisión de factura seleccionado."
#: pretix/base/forms/user.py:54 pretix/control/forms/organizer.py:458
#: pretix/control/forms/users.py:58
#, fuzzy
msgid "Default timezone"
msgstr "Zona horaria predefinida"
msgstr "Fuso horario predeterminado"
#: pretix/base/forms/user.py:55 pretix/control/forms/users.py:59
#, fuzzy
msgid ""
"Only used for views that are not bound to an event. For all event views, the "
"event timezone is used instead."
msgstr ""
"Sólo se utiliza para vistas que no están vinculadas a un evento. Para todas "
"las vistas de eventos, se utiliza la zona horaria de eventos."
"Só se usa para vistas que non están vinculadas a un evento. Para todas as "
"vistas de eventos, úsase o fuso horario do evento."
#: pretix/base/forms/user.py:77
#, fuzzy
#| msgid "Attendee email address"
msgid "Change email address"
msgstr "Correo electrónico do participante"
msgstr "Cambiar enderezo de correo electrónico"
#: pretix/base/forms/user.py:83
msgid "Device name"
msgstr "Nombre do dispositivo"
#: pretix/base/forms/user.py:84
#, fuzzy
msgid "Device type"
msgstr "Tipo de dispositivo"
#: pretix/base/forms/user.py:85
#, fuzzy
msgid "Smartphone with the Authenticator application"
msgstr "Celular con aplicación de autenticación"
msgstr "Teléfono intelixente coa aplicación Authenticator"
#: pretix/base/forms/user.py:86
#, fuzzy
msgid "WebAuthn-compatible hardware token (e.g. Yubikey)"
msgstr "Hardware compatible con token WebAuthn (p. ej. Yubikey)"
msgstr "Token de hardware compatible con WebAuthn (por exemplo, Yubikey)"
#: pretix/base/forms/user.py:92 pretix/presale/forms/customer.py:383
#: pretix/presale/forms/customer.py:456
#, fuzzy
msgid "The current password you entered was not correct."
msgstr "La contraseña actual que ingresó no es correcta."
msgstr "O contrasinal actual que introduciches non era correcto."
#: pretix/base/forms/user.py:95
msgid "Please choose a password different to your current one."
msgstr ""
msgstr "Escolle un contrasinal diferente ao teu actual."
#: pretix/base/forms/user.py:105 pretix/presale/forms/customer.py:392
#: pretix/presale/forms/customer.py:461
#, fuzzy
msgid "Your current password"
msgstr "Su contraseña actual"
msgstr "O teu contrasinal actual"
#: pretix/base/forms/user.py:111 pretix/control/forms/users.py:50
#: pretix/presale/forms/customer.py:397
#, fuzzy
msgid "New password"
msgstr "Nueva contraseña"
msgstr "New password"
#: pretix/base/forms/user.py:117 pretix/control/forms/users.py:54
#, fuzzy
msgid "Repeat new password"
msgstr "Repetir la nueva contraseña"
msgstr "Repita o novo contrasinal"
#: pretix/base/forms/user.py:176 pretix/control/forms/users.py:43
#, fuzzy
msgid ""
"There already is an account associated with this email address. Please "
"choose a different one."
msgstr ""
"Ya existe una cuenta asociada a este correo electrónico. Por favor, escoja "
"otro."
"Xa existe unha conta asociada a este enderezo de correo electrónico. Escolle "
"unha diferente."
#: pretix/base/forms/user.py:179
#, fuzzy
#| msgid "Email address"
msgid "Old email address"
msgstr "Correo electrónico"
msgstr "Enderezo de correo electrónico antigo"
#: pretix/base/forms/user.py:180
#, fuzzy
#| msgid "Email address"
msgid "New email address"
msgstr "Correo electrónico"
msgstr "Novo enderezo de correo electrónico"
#: pretix/base/forms/validators.py:51
msgid ""
@@ -3492,29 +3488,32 @@ msgid ""
"up. Please note: to use literal \"{\" or \"}\", you need to double them as "
"\"{{\" and \"}}\"."
msgstr ""
"Hai un erro coa sintaxe dos marcadores de posición. Comproba que as "
"corchetes de apertura \"{\" e de peche \"}\" dos marcadores de posición "
"coincidan. Ten en conta que para usar \"{\" ou \"}\" literal, debes "
"duplicalos como \"{{\" e \"}}\"."
#: pretix/base/forms/validators.py:72 pretix/control/views/event.py:870
#, fuzzy, python-format
#, python-format
msgid "Invalid placeholder: {%(value)s}"
msgstr "Persona(s) interesada(s) inválida(s): %(value)s"
msgstr "Marcador de posición non válido: {%(value)s}"
#: pretix/base/forms/widgets.py:68
#, fuzzy, python-format
#, python-format
msgid "Sample: %s"
msgstr "Ciudad de ejemplo"
msgstr "Mostra: %s"
#: pretix/base/forms/widgets.py:71
#, python-brace-format
msgid "Available placeholders: {list}"
msgstr ""
msgstr "Marcadores de posición dispoñibles: {list}"
#: pretix/base/forms/widgets.py:214 pretix/base/models/items.py:1655
#: pretix/plugins/checkinlists/exporters.py:757
#: pretix/plugins/sendmail/templates/pretixplugins/sendmail/rule_create.html:40
#: pretix/plugins/sendmail/templates/pretixplugins/sendmail/rule_update.html:54
#, fuzzy
msgid "Time"
msgstr "Hora"
msgstr "Tempo"
#: pretix/base/forms/widgets.py:234 pretix/base/forms/widgets.py:239
msgid "Business or institutional customer"
@@ -3527,53 +3526,49 @@ msgstr "Cliente individual"
#: pretix/base/invoicing/email.py:50
msgid "Email invoice directly to accounting department"
msgstr ""
"Enviar factura por correo electrónico directamente ao departamento de "
"contabilidade"
#: pretix/base/invoicing/email.py:51
#, fuzzy
#| msgid "Please enter the same email address twice."
msgid ""
"If not selected, the invoice will be sent to you using the email address "
"listed above."
msgstr "Introduce o mesmo enderezo de correo electrónico dúas veces."
msgstr ""
"Se non se selecciona, a factura enviaraseche usando o enderezo de correo "
"electrónico indicado anteriormente."
#: pretix/base/invoicing/email.py:55
#, fuzzy
#| msgid "Email address verified"
msgid "Email address for invoice"
msgstr "Correo electrónico verificado"
msgstr "Enderezo de correo electrónico para factura"
#: pretix/base/invoicing/email.py:91
#, fuzzy
msgid "PDF via email"
msgstr "Vista previa del correo electrónico"
msgstr "PDF por correo electrónico"
#: pretix/base/invoicing/national.py:37
msgctxt "italian_invoice"
msgid "Italian Exchange System (SdI)"
msgstr ""
msgstr "Sistema de intercambio italiano (SdI)"
#: pretix/base/invoicing/national.py:38
msgctxt "italian_invoice"
msgid "Exchange System (SdI)"
msgstr ""
msgstr "Sistema de intercambio (SdI)"
#: pretix/base/invoicing/national.py:49
#, fuzzy
#| msgid "Gift card code"
msgctxt "italian_invoice"
msgid "Fiscal code"
msgstr "Código da tarxeta de regalo"
msgstr "Código fiscal"
#: pretix/base/invoicing/national.py:53
msgctxt "italian_invoice"
msgid "Address for certified electronic mail"
msgstr ""
msgstr "Enderezo para correo electrónico certificado"
#: pretix/base/invoicing/national.py:57
#, fuzzy
msgctxt "italian_invoice"
msgid "Recipient code"
msgstr "Destinatario"
msgstr "Código do destinatario"
#: pretix/base/invoicing/national.py:81
msgctxt "italian_invoice"
@@ -3583,75 +3578,68 @@ msgid ""
"in accordance with the procedures and terms set forth in No. 89757/2018 of "
"April 30, 2018, issued by the Director of the Revenue Agency."
msgstr ""
"Este documento PDF é unha copia visual da factura e non constitúe unha "
"factura para efectos do IVE. A factura emítese en formato XML, transmitida "
"de acordo cos procedementos e termos establecidos no Regulamento n.º 89757/"
"2018, do 30 de abril de 2018, emitido polo Director da Axencia Tributaria."
#: pretix/base/invoicing/pdf.py:143
#, fuzzy, python-format
#, python-format
msgctxt "invoice"
msgid "Page %d of %d"
msgstr "Página %d de %d"
msgstr "Páxina %d de %d"
#: pretix/base/invoicing/pdf.py:384
#, fuzzy
msgctxt "invoice"
msgid "Classic renderer (pretix 1.0)"
msgstr "Versión clásica (pretix 1.0)"
msgstr "Renderizador clásico (pretix 1.0)"
#: pretix/base/invoicing/pdf.py:428
#, fuzzy
msgctxt "invoice"
msgid "Invoice from"
msgstr "Factura de"
msgstr "Factura dende"
#: pretix/base/invoicing/pdf.py:434
#, fuzzy
msgctxt "invoice"
msgid "Invoice to"
msgstr "Factura para"
msgstr "Factura ata"
#: pretix/base/invoicing/pdf.py:471 pretix/base/invoicing/pdf.py:1222
#, fuzzy
msgctxt "invoice"
msgid "Order code"
msgstr "Código de la orden"
msgstr "Código de pedido"
#: pretix/base/invoicing/pdf.py:480 pretix/base/invoicing/pdf.py:1235
#, fuzzy
msgctxt "invoice"
msgid "Cancellation number"
msgstr "Número de cancelación"
#: pretix/base/invoicing/pdf.py:486 pretix/base/invoicing/pdf.py:1237
#, fuzzy
msgctxt "invoice"
msgid "Original invoice"
msgstr "Factura original"
msgstr "Factura orixinal"
#: pretix/base/invoicing/pdf.py:491 pretix/base/invoicing/pdf.py:1242
#, fuzzy
msgctxt "invoice"
msgid "Invoice number"
msgstr "Número de factura"
#: pretix/base/invoicing/pdf.py:499 pretix/base/invoicing/pdf.py:1257
#, fuzzy
msgctxt "invoice"
msgid "Cancellation date"
msgstr "Fecha de cancelación"
msgstr "Data de cancelación"
#: pretix/base/invoicing/pdf.py:505
#, fuzzy
msgctxt "invoice"
msgid "Original invoice date"
msgstr "Fecha original de la factura"
msgstr "Data orixinal da factura"
#: pretix/base/invoicing/pdf.py:512 pretix/base/invoicing/pdf.py:1259
#, fuzzy
msgctxt "invoice"
msgid "Invoice date"
msgstr "Fecha de la factura"
msgstr "Data da factura"
#: pretix/base/invoicing/pdf.py:528
#, fuzzy
msgctxt "invoice"
msgid "Event"
msgstr "Evento"
@@ -3667,7 +3655,7 @@ msgstr ""
" ata {to_date}"
#: pretix/base/invoicing/pdf.py:609 pretix/base/services/mail.py:512
#, fuzzy, python-brace-format
#, python-brace-format
msgctxt "invoice"
msgid "Invoice {num}"
msgstr "Factura {num}"
@@ -3679,25 +3667,21 @@ msgid "Customer reference: {reference}"
msgstr "Referencia do cliente: {reference}"
#: pretix/base/invoicing/pdf.py:669
#, fuzzy
msgctxt "invoice"
msgid "Customer VAT ID"
msgstr "Cliente VAT ID"
msgstr "CIF do cliente"
#: pretix/base/invoicing/pdf.py:676
#, fuzzy
msgctxt "invoice"
msgid "Beneficiary"
msgstr "Beneficiario"
#: pretix/base/invoicing/pdf.py:709
#, fuzzy
msgctxt "invoice"
msgid "Tax Invoice"
msgstr "Impuesto de la factura"
msgstr "Factura fiscal"
#: pretix/base/invoicing/pdf.py:710
#, fuzzy
msgctxt "invoice"
msgid "Invoice"
msgstr "Factura"
@@ -3706,7 +3690,6 @@ msgstr "Factura"
#: pretix/control/templates/pretixcontrol/order/index.html:272
#: pretix/control/templates/pretixcontrol/order/mail_history.html:70
#: pretix/presale/templates/pretixpresale/event/order.html:244
#, fuzzy
msgctxt "invoice"
msgid "Cancellation"
msgstr "Cancelación"
@@ -3724,110 +3707,97 @@ msgid "Qty"
msgstr "Cant."
#: pretix/base/invoicing/pdf.py:735 pretix/base/invoicing/pdf.py:1039
#, fuzzy
msgctxt "invoice"
msgid "Tax rate"
msgstr "Tasa de impuestos"
msgstr "Tipo impositivo"
#: pretix/base/invoicing/pdf.py:736
#, fuzzy
msgctxt "invoice"
msgid "Net"
msgstr "Neto"
#: pretix/base/invoicing/pdf.py:737
#, fuzzy
msgctxt "invoice"
msgid "Gross"
msgstr "Bruto"
#: pretix/base/invoicing/pdf.py:743
#, fuzzy
msgctxt "invoice"
msgid "Amount"
msgstr "Monto"
msgstr "Cantidade"
#: pretix/base/invoicing/pdf.py:870
#, python-brace-format
msgctxt "invoice"
msgid "Single price: {net_price} net / {gross_price} gross"
msgstr ""
msgstr "Prezo único: {net_price} neto / {gross_price} bruto"
#: pretix/base/invoicing/pdf.py:901
#, fuzzy, python-brace-format
#, python-brace-format
msgctxt "invoice"
msgid "Single price: {price}"
msgstr "Precio original"
msgstr "Prezo único: {price}"
#: pretix/base/invoicing/pdf.py:944 pretix/base/invoicing/pdf.py:949
#, fuzzy
msgctxt "invoice"
msgid "Invoice total"
msgstr "Total de la factura"
msgstr "Total da factura"
#: pretix/base/invoicing/pdf.py:958
#, fuzzy
msgctxt "invoice"
msgid "Received payments"
msgstr "Pagos recibidos"
#: pretix/base/invoicing/pdf.py:963
#, fuzzy
msgctxt "invoice"
msgid "Outstanding payments"
msgstr "Pagos no válidos"
msgstr "Pagos pendentes"
#: pretix/base/invoicing/pdf.py:980
#, fuzzy
msgctxt "invoice"
msgid "Paid by gift card"
msgstr "Tarjeta de crédito"
msgstr "Pago con tarxeta regalo"
#: pretix/base/invoicing/pdf.py:985
#, fuzzy
msgctxt "invoice"
msgid "Remaining amount"
msgstr "Monto pendiente"
msgstr "Cantidade restante"
#: pretix/base/invoicing/pdf.py:1009
#, fuzzy, python-brace-format
#, python-brace-format
msgctxt "invoice"
msgid "Invoice period: {daterange}"
msgstr "Rango de fechas de evento"
msgstr "Período de facturación: {daterange}"
#: pretix/base/invoicing/pdf.py:1040
#, fuzzy
msgctxt "invoice"
msgid "Net value"
msgstr "Valor neto"
#: pretix/base/invoicing/pdf.py:1041
#, fuzzy
msgctxt "invoice"
msgid "Gross value"
msgstr "Valor bruto"
#: pretix/base/invoicing/pdf.py:1042
#, fuzzy
msgctxt "invoice"
msgid "Tax"
msgstr "Impuesto"
msgstr "Imposto"
#: pretix/base/invoicing/pdf.py:1072
#, fuzzy
msgctxt "invoice"
msgid "Included taxes"
msgstr "Impuestos incluidos"
msgstr "Impostos incluídos"
#: pretix/base/invoicing/pdf.py:1100
#, fuzzy, python-brace-format
#, python-brace-format
msgctxt "invoice"
msgid ""
"Using the conversion rate of 1:{rate} as published by the {authority} on "
"{date}, this corresponds to:"
msgstr ""
"Utilizando el tipo de conversión de 1:{rate} publicado por el Banco Central "
"Europeo el {date}, esto corresponde a:"
"Usando a taxa de conversión de 1:{rate} tal e como a publicou {authority} o "
"{date}, isto corresponde a:"
#: pretix/base/invoicing/pdf.py:1115
#, fuzzy, python-brace-format
@@ -3836,33 +3806,34 @@ msgid ""
"Using the conversion rate of 1:{rate} as published by the {authority} on "
"{date}, the invoice total corresponds to {total}."
msgstr ""
"Utilizando el tipo de conversión de 1:{rate} publicado por el Banco Central "
"Europeo el {date}, el total de la factura corresponde a {total}."
"Usando a taxa de conversión de 1:{rate} publicada pola {authority} o {date}, "
"o total da factura corresponde a {total}."
#: pretix/base/invoicing/pdf.py:1129
msgid "Default invoice renderer (European-style letter)"
msgstr ""
msgstr "Renderizador de facturas predeterminado (carta de estilo europeo)"
#: pretix/base/invoicing/pdf.py:1218
#, fuzzy
msgctxt "invoice"
msgid "(Please quote at all times.)"
msgstr "Por favor, seleccione una cuota."
msgstr "(Por favor, cite en todo momento.)"
#: pretix/base/invoicing/pdf.py:1265
msgid "Simplified invoice renderer"
msgstr ""
msgstr "Renderizador de facturas simplificado"
#: pretix/base/invoicing/pdf.py:1284
#, fuzzy, python-brace-format
msgctxt "invoice"
msgid "Event date: {date_range}"
msgstr "Rango de fechas de evento"
msgstr "Data do evento: {date_range}"
#: pretix/base/invoicing/peppol.py:128
msgid ""
"A Peppol participant ID always starts with a prefix, followed by a colon (:)."
msgstr ""
"Un ID de participante de Peppol sempre comeza cun prefixo, seguido de dous "
"puntos (:)."
#: pretix/base/invoicing/peppol.py:132
#, python-format
@@ -3870,6 +3841,8 @@ msgid ""
"The Peppol participant ID prefix %(number)s is not known to our system. "
"Please reach out to us if you are sure this ID is correct."
msgstr ""
"O noso sistema descoñece o prefixo do ID de participante de Peppol %(number)"
"s. Ponte en contacto connosco se estás seguro de que este ID é correcto."
#: pretix/base/invoicing/peppol.py:136
#, python-format
@@ -3877,17 +3850,18 @@ msgid ""
"The Peppol participant ID does not match the validation rules for the prefix "
"%(number)s. Please reach out to us if you are sure this ID is correct."
msgstr ""
"O ID de participante de Peppol non coincide coas regras de validación para o "
"prefixo %(number)s. Ponte en contacto connosco se estás seguro de que este "
"ID é correcto."
#: pretix/base/invoicing/peppol.py:156
msgid "Peppol participant ID"
msgstr ""
msgstr "Identificación de participante de Peppol"
#: pretix/base/invoicing/peppol.py:170
#, fuzzy
#| msgid "Gift card code"
msgctxt "peppol_invoice"
msgid "Visual copy"
msgstr "Código da tarxeta de regalo"
msgstr "Copia visual"
#: pretix/base/invoicing/peppol.py:175
msgctxt "peppol_invoice"
@@ -3896,27 +3870,30 @@ msgid ""
"invoice for VAT purposes. The original invoice is issued in XML format and "
"transmitted through the Peppol network."
msgstr ""
"Este documento PDF é unha copia visual da factura e non constitúe unha "
"factura para efectos do IVE. A factura orixinal emítese en formato XML e "
"transmítese a través da rede Peppol."
#: pretix/base/logentrytype_registry.py:43
msgid ""
"The relevant plugin is currently not active. To activate it, click here to "
"go to the plugin settings."
msgstr ""
"O plugin relevante non está activo actualmente. Para activalo, fai clic aquí "
"para ir á configuración do plugin."
#: pretix/base/logentrytype_registry.py:53
#, fuzzy
msgid "The relevant plugin is currently not active."
msgstr "La taquilla seleccionada no está disponible en este momento."
msgstr "O plugin relevante non está activo actualmente."
#: pretix/base/logentrytypes.py:49
#, fuzzy
msgid "(deleted)"
msgstr "Eliminar"
msgstr "(eliminado)"
#: pretix/base/logentrytypes.py:78
#, fuzzy, python-brace-format
#, python-brace-format
msgid "Order {val}"
msgstr "Orden {val}"
msgstr "Orde {val}"
#: pretix/base/logentrytypes.py:90
#, fuzzy, python-brace-format

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-27 13:57+0000\n"
"PO-Revision-Date: 2025-11-26 17:00+0000\n"
"PO-Revision-Date: 2025-12-05 18:00+0000\n"
"Last-Translator: Yasunobu YesNo Kawaguchi <kawaguti@gmail.com>\n"
"Language-Team: Japanese <https://translate.pretix.eu/projects/pretix/pretix/"
"ja/>\n"
@@ -2149,7 +2149,7 @@ msgstr "クライアントID"
#: pretix/base/exporters/items.py:91 pretix/base/models/items.py:667
#: pretix/base/models/items.py:1168
msgid "Original price"
msgstr "元の価格"
msgstr "通常価格"
#: pretix/base/exporters/items.py:92 pretix/base/models/items.py:684
msgid "This product is a gift card"
@@ -22741,9 +22741,8 @@ msgid ""
"This position has been created with a voucher with a limited budget. If you "
"change the price or item, the discount will still be calculated from the "
"original price at the time of purchase."
msgstr ""
"このポジションは限られた予算のバウチャーで作成されました。価格やアイテムを変"
"更しても、割引は購入時の元の価格から計算されます。"
msgstr "このポジションは限られた予算のバウチャーで作成されました。価格やアイテムを変"
"更しても、割引は購入時の通常価格から計算されます。"
#: pretix/control/templates/pretixcontrol/order/change.html:101
#: pretix/control/templates/pretixcontrol/order/change.html:413
@@ -33770,7 +33769,7 @@ msgstr "バリエーションを表示する"
#: pretix/presale/templates/pretixpresale/event/voucher.html:147
#: pretix/presale/templates/pretixpresale/event/voucher.html:304
msgid "Original price:"
msgstr "元の価格:"
msgstr "通常価格:"
#: pretix/presale/templates/pretixpresale/event/fragment_addon_choice.html:136
#: pretix/presale/templates/pretixpresale/event/fragment_addon_choice.html:278

View File

@@ -7,16 +7,16 @@ msgstr ""
"Project-Id-Version: 1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-27 13:57+0000\n"
"PO-Revision-Date: 2025-10-26 18:00+0000\n"
"Last-Translator: Jan Van Haver <jan.van.haver@gmail.com>\n"
"Language-Team: Dutch <https://translate.pretix.eu/projects/pretix/pretix/nl/"
">\n"
"PO-Revision-Date: 2025-12-08 07:00+0000\n"
"Last-Translator: Ruud Hendrickx <ruud@leckxicon.eu>\n"
"Language-Team: Dutch <https://translate.pretix.eu/projects/pretix/pretix/nl/>"
"\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.14\n"
"X-Generator: Weblate 5.14.3\n"
#: pretix/_base_settings.py:87
msgid "English"
@@ -44,7 +44,7 @@ msgstr "Catalaans"
#: pretix/_base_settings.py:93
msgid "Chinese (simplified)"
msgstr "Chinees (versimpeld)"
msgstr "Chinees (vereenvoudigd)"
#: pretix/_base_settings.py:94
msgid "Chinese (traditional)"

View File

@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-27 13:57+0000\n"
"PO-Revision-Date: 2024-02-13 16:00+0000\n"
"Last-Translator: Wessel Stam <info@wesselstam.nl>\n"
"PO-Revision-Date: 2025-12-08 07:00+0000\n"
"Last-Translator: Ruud Hendrickx <ruud@leckxicon.eu>\n"
"Language-Team: Dutch (informal) <https://translate.pretix.eu/projects/pretix/"
"pretix/nl_Informal/>\n"
"Language: nl_Informal\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.3.1\n"
"X-Generator: Weblate 5.14.3\n"
#: pretix/_base_settings.py:87
msgid "English"
@@ -37,15 +37,15 @@ msgstr "Arabisch"
#: pretix/_base_settings.py:91
msgid "Basque"
msgstr ""
msgstr "Baskisch"
#: pretix/_base_settings.py:92
msgid "Catalan"
msgstr ""
msgstr "Catalaans"
#: pretix/_base_settings.py:93
msgid "Chinese (simplified)"
msgstr "Chinees (versimpeld)"
msgstr "Chinees (vereenvoudigd)"
#: pretix/_base_settings.py:94
msgid "Chinese (traditional)"
@@ -57,7 +57,7 @@ msgstr "Tsjechisch"
#: pretix/_base_settings.py:96
msgid "Croatian"
msgstr ""
msgstr "Kroatisch"
#: pretix/_base_settings.py:97
msgid "Danish"
@@ -89,7 +89,7 @@ msgstr "Grieks"
#: pretix/_base_settings.py:104
msgid "Hebrew"
msgstr ""
msgstr "Hebreeuws"
#: pretix/_base_settings.py:105
msgid "Indonesian"
@@ -101,7 +101,7 @@ msgstr "Italiaans"
#: pretix/_base_settings.py:107
msgid "Japanese"
msgstr ""
msgstr "Japans"
#: pretix/_base_settings.py:108
msgid "Latvian"
@@ -133,11 +133,11 @@ msgstr "Russisch"
#: pretix/_base_settings.py:115
msgid "Slovak"
msgstr ""
msgstr "Slowaaks"
#: pretix/_base_settings.py:116
msgid "Swedish"
msgstr ""
msgstr "Zweeds"
#: pretix/_base_settings.py:117
msgid "Spanish"
@@ -145,7 +145,7 @@ msgstr "Spaans"
#: pretix/_base_settings.py:118
msgid "Spanish (Latin America)"
msgstr ""
msgstr "Spaans (Latijns-Amerika)"
#: pretix/_base_settings.py:119
msgid "Turkish"
@@ -261,7 +261,7 @@ msgstr ""
#: pretix/api/serializers/event.py:234 pretix/api/serializers/event.py:554
#, python-brace-format
msgid "Meta data property '{name}' does not exist."
msgstr "Metadataeigenschap '{name}' bestaat niet."
msgstr "Metadata-eigenschap '{name}' bestaat niet."
#: pretix/api/serializers/event.py:237 pretix/api/serializers/event.py:557
#, python-brace-format
@@ -32970,7 +32970,7 @@ msgstr ""
#: pretix/plugins/reports/exporters.py:257
msgctxt "export_category"
msgid "Analysis"
msgstr ""
msgstr "Analyse"
#: pretix/plugins/reports/accountingreport.py:83
#, fuzzy

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-27 13:57+0000\n"
"PO-Revision-Date: 2025-09-10 05:00+0000\n"
"PO-Revision-Date: 2025-12-09 07:09+0000\n"
"Last-Translator: Renne Rocha <renne@rocha.dev.br>\n"
"Language-Team: Portuguese (Brazil) <https://translate.pretix.eu/projects/"
"pretix/pretix/pt_BR/>\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 5.13.2\n"
"X-Generator: Weblate 5.14.3\n"
#: pretix/_base_settings.py:87
msgid "English"
@@ -253,9 +253,8 @@ msgid ""
"Events cannot be created as 'live'. Quotas and payment must be added to the "
"event before sales can go live."
msgstr ""
"Os eventos não podem ser criados como 'ativo'. As cotas e métodos de "
"pagamento devem ser adicionados ao evento antes que as vendas possam ser "
"iniciadas."
"Eventos não podem ser criados como 'ativo'. Cotas e métodos de pagamento "
"devem ser adicionados ao evento antes que as vendas se iniciem."
#: pretix/api/serializers/event.py:234 pretix/api/serializers/event.py:554
#, python-brace-format
@@ -358,7 +357,8 @@ msgstr ""
#: pretix/api/serializers/item.py:587 pretix/control/forms/item.py:177
msgid "Question cannot depend on a question asked during check-in."
msgstr "A pergunta não pode depender de uma pergunta feita durante o check-in."
msgstr ""
"A pergunta não pode depender de outra pergunta feita durante o check-in."
#: pretix/api/serializers/item.py:592 pretix/control/forms/item.py:182
msgid "Circular dependency between questions detected."
@@ -3286,10 +3286,8 @@ msgid "Repeat password"
msgstr "Repita a senha"
#: pretix/base/forms/auth.py:220 pretix/base/forms/user.py:99
#, fuzzy
#| msgid "Email address"
msgid "Your email address"
msgstr "Endereço de email"
msgstr "Seu endereço de e-mail"
#: pretix/base/forms/auth.py:327 pretix/control/forms/orders.py:1041
#: pretix/control/templates/pretixcontrol/shredder/download.html:53
@@ -3433,10 +3431,8 @@ msgstr ""
"as exibições de eventos, o fuso horário do evento é usado."
#: pretix/base/forms/user.py:77
#, fuzzy
#| msgid "Attendee email address"
msgid "Change email address"
msgstr "Email do participante"
msgstr "Alterar endereço de e-mail"
#: pretix/base/forms/user.py:83
msgid "Device name"
@@ -3486,16 +3482,12 @@ msgstr ""
"um diferente."
#: pretix/base/forms/user.py:179
#, fuzzy
#| msgid "Email address"
msgid "Old email address"
msgstr "Endereço de email"
msgstr "Endereço de e-mail antigo"
#: pretix/base/forms/user.py:180
#, fuzzy
#| msgid "Email address"
msgid "New email address"
msgstr "Endereço de email"
msgstr "Endereço de e-mail novo"
#: pretix/base/forms/validators.py:51
msgid ""
@@ -3540,22 +3532,17 @@ msgid "Individual customer"
msgstr "Cliente pessoa física"
#: pretix/base/invoicing/email.py:50
#, fuzzy
#| msgid ""
#| "To send the invoice directly to your accounting department, please enter "
#| "their email address:"
msgid "Email invoice directly to accounting department"
msgstr ""
"Para enviar a fatura diretamente ao seu departamento de contabilidade, "
"insira o endereço de e-mail:"
"Enviar e-mail com a fatura diretamente para departamento de contabilidade"
#: pretix/base/invoicing/email.py:51
#, fuzzy
#| msgid "The invoice was sent to the designated email address."
msgid ""
"If not selected, the invoice will be sent to you using the email address "
"listed above."
msgstr "A fatura foi enviada para o endereço de e-mail designado."
msgstr ""
"Se não selecionado, a fatura será enviada para o endereço de e-mail listado "
"a seguir."
#: pretix/base/invoicing/email.py:55
msgid "Email address for invoice"
@@ -3778,12 +3765,10 @@ msgid "Remaining amount"
msgstr "Valor restante"
#: pretix/base/invoicing/pdf.py:1009
#, fuzzy, python-brace-format
#| msgctxt "invoice"
#| msgid "Event date: {date_range}"
#, python-brace-format
msgctxt "invoice"
msgid "Invoice period: {daterange}"
msgstr "Data do evento: {date_range}"
msgstr "Período da fatura: {daterange}"
#: pretix/base/invoicing/pdf.py:1040
msgctxt "invoice"
@@ -3868,12 +3853,9 @@ msgid "Peppol participant ID"
msgstr ""
#: pretix/base/invoicing/peppol.py:170
#, fuzzy
#| msgctxt "italian_invoice"
#| msgid "Fiscal code"
msgctxt "peppol_invoice"
msgid "Visual copy"
msgstr "Código fiscal"
msgstr "Cópia visual"
#: pretix/base/invoicing/peppol.py:175
msgctxt "peppol_invoice"
@@ -4357,10 +4339,8 @@ msgid ""
msgstr ""
#: pretix/base/models/auth.py:392
#, fuzzy
#| msgid "Confirmation code"
msgid "pretix confirmation code"
msgstr "Código de confirmação"
msgstr "código de confirmação do pretix"
#: pretix/base/models/auth.py:435
#: pretix/control/templates/pretixcontrol/auth/forgot.html:7
@@ -4862,11 +4842,11 @@ msgid ""
"you can also choose to use a random value. This will be used in URLs, order "
"codes, invoice numbers, and bank transfer references."
msgstr ""
"Deve ser curts, conter apenas letras minúsculas, números, pontos e traços, e "
"ser exclusiva entre seus eventos. Recomendamos algum tipo de abreviação ou "
"uma data com menos de 10 caracteres que sejam facilmente lembradas, mas você "
"também pode usar um valor aleatório. Esta informação será usada em URLs, "
"códigos de pedido, números de fatura e referências de transferência bancária."
"Deve conter apenas letras minúsculas, números, pontos e traços, sendo "
"exclusiva para suas eventos. Recomendamos uma abreviação ou data com menos "
"de 10 caracteres e que seja facilmente lembrada, mas você também pode usar "
"um valor aleatório. Esta informação será usada em URLs, códigos de pedido, "
"número de faturas e referências de transações bancárias."
#: pretix/base/models/event.py:607 pretix/base/models/organizer.py:89
msgid "The slug may only contain letters, numbers, dots and dashes."
@@ -5394,24 +5374,16 @@ msgstr ""
"não tiver variações, este preço será usado."
#: pretix/base/models/items.py:506
#, fuzzy
#| msgid ""
#| "If this option is active, your users can choose the price themselves. The "
#| "price configured above is then interpreted as the minimum price a user "
#| "has to enter. You could use this e.g. to collect additional donations for "
#| "your event. This is currently not supported for products that are bought "
#| "as an add-on to other products."
msgid ""
"If this option is active, your users can choose the price themselves. The "
"price configured above is then interpreted as the minimum price a user has "
"to enter. You could use this e.g. to collect additional donations for your "
"event."
msgstr ""
"Se esta opção estiver ativa, seus usuários podem escolher o próprio preço. O "
"preço configurado acima é então interpretado como o preço mínimo que um "
"usuário deve inserir. Você pode usar isso, por exemplo, para coletar doações "
"adicionais para o seu evento. No momento, isto não é suportado por produtos "
"comprados como um complemento de outros produtos."
"Se esta opção está selecionada, os usuários poderão pagar o preço que "
"desejarem. O preço padrão acima será interpretado como o preço mínimo que o "
"usuário deverá pagar. Você pode usar esta opção, por exemplo, para coletar "
"doações adicionais para o seu evento."
#: pretix/base/models/items.py:511 pretix/base/models/items.py:1175
msgid "Suggested price"
@@ -6298,9 +6270,6 @@ msgstr ""
"insira um valor possível por linha."
#: pretix/base/models/items.py:2310
#, fuzzy
#| msgctxt "timeframe"
#| msgid "Start"
msgid "Start"
msgstr "Início"
@@ -7912,10 +7881,8 @@ msgid "123.45 EUR"
msgstr "123.45 BRL"
#: pretix/base/pdf.py:166
#, fuzzy
#| msgid "Price including add-ons"
msgid "Price including bundled products"
msgstr "Preço incluindo complementos"
msgstr "Preços incluindo produtos empacotados"
#: pretix/base/pdf.py:175
#, fuzzy
@@ -9878,10 +9845,8 @@ msgid "Require a phone number per order"
msgstr "Exigir um número de telefone por pedido"
#: pretix/base/settings.py:482
#, fuzzy
#| msgid "including all taxes"
msgid "Rounding of taxes"
msgstr "incluindo todos os impostos"
msgstr "Arredondamento dos impostos"
#: pretix/base/settings.py:486
msgid ""
@@ -10424,18 +10389,12 @@ msgid "Automatic, but prefer invoice date over event date"
msgstr ""
#: pretix/base/settings.py:1142 pretix/base/settings.py:1153
#, fuzzy
#| msgctxt "invoice"
#| msgid "Invoice date"
msgid "Invoice date"
msgstr "Data da fatura"
#: pretix/base/settings.py:1146
#, fuzzy
#| msgctxt "subevent"
#| msgid "Date ordering"
msgid "Date of service"
msgstr "Ordenação de datas"
msgstr "Data do serviço"
#: pretix/base/settings.py:1155
msgid ""
@@ -11299,8 +11258,8 @@ msgstr "Endereço de contato"
#: pretix/base/settings.py:2161 pretix/control/forms/event.py:1824
msgid "We'll show this publicly to allow attendees to contact you."
msgstr ""
"Mostraremos isso publicamente para permitir que os participantes entrem em "
"contato com você."
"Será exibido publicamente para que participantes possam entrar em contato "
"com você."
#: pretix/base/settings.py:2169 pretix/control/forms/event.py:1816
msgid "Imprint URL"
@@ -12166,17 +12125,7 @@ msgid "Invoice {invoice_number}"
msgstr "Fatura {invoice_number}"
#: pretix/base/settings.py:2789
#, fuzzy, python-brace-format
#| msgid ""
#| "Hello,\n"
#| "\n"
#| "somebody requested a list of your orders for {event}.\n"
#| "The list is as follows:\n"
#| "\n"
#| "{orders}\n"
#| "\n"
#| "Best regards, \n"
#| "Your {event} team"
#, python-brace-format
msgid ""
"Hello,\n"
"\n"
@@ -12189,12 +12138,12 @@ msgid ""
msgstr ""
"Olá,\n"
"\n"
"Segue anexo uma nova fatura para o pedido {code} para {evento} . Este pedido "
"foi feito por {order_email}.\n"
"Em anexo você encontrará uma nova fatura para o pedido {code} para {event}. "
"Este pedido foi feito por {order_email}.\n"
"\n"
"Atenciosamente, \n"
"\n"
"Equipe organizadora de {event}"
"Organização {event}"
#: pretix/base/settings.py:2807 pretix/base/settings.py:2823
#, python-brace-format
@@ -13937,7 +13886,7 @@ msgstr "Padrão ({value})"
#: pretix/control/forms/event.py:380
msgid "The currency cannot be changed because orders already exist."
msgstr ""
msgstr "A moeda não pode ser alterada pois já foram realizados pedidos."
#: pretix/control/forms/event.py:391 pretix/control/forms/event.py:404
msgid "Domain"
@@ -14023,21 +13972,16 @@ msgstr ""
"que o cartão-presente é emitido."
#: pretix/control/forms/event.py:813
#, fuzzy
#| msgid "including all taxes"
msgid "Prices including tax"
msgstr "incluindo todos os impostos"
msgstr "Preços incluindo impostos"
#: pretix/control/forms/event.py:814
msgid "Recommended if you sell tickets at least partly to consumers."
msgstr ""
#: pretix/control/forms/event.py:818
#, fuzzy
#| msgctxt "reporting_timeframe"
#| msgid "All future (excluding today)"
msgid "Prices excluding tax"
msgstr "Todos os futuros (excluindo hoje)"
msgstr "Preços excluindo impostos"
#: pretix/control/forms/event.py:819
msgid "Recommended only if you sell tickets primarily to business customers."
@@ -17410,10 +17354,9 @@ msgstr ""
"O endereço de e-mail foi alterado de \"{old_email}\" para \"{new_email}\"."
#: pretix/control/logdisplay.py:673
#, fuzzy, python-brace-format
#| msgid "Your email address has been updated."
#, python-brace-format
msgid "Your email address {email} has been confirmed."
msgstr "Seu endereço de email foi atualizado."
msgstr "Seu endereço de e-mail {email} foi confirmado."
#: pretix/control/logdisplay.py:685
#, python-brace-format
@@ -19690,6 +19633,20 @@ msgid ""
"Best regards,\n"
"Your pretix team\n"
msgstr ""
"Olá,\n"
"\n"
"%(reason)s\n"
"\n"
" %(code)s\n"
"\n"
"Por favor, nunca forneça este código para outra pessoa. Nosso time de "
"suporte nunca irá solicitar este código.\n"
"\n"
"Se você não solicitou este código, por favor entre em contato conosco "
"imediatamente.\n"
"\n"
"Atenciosamente,\n"
"Time pretix\n"
#: pretix/control/templates/pretixcontrol/email/email_setup.txt:1
#, python-format
@@ -21314,10 +21271,8 @@ msgid "with custom rules"
msgstr "Regras personalizadas"
#: pretix/control/templates/pretixcontrol/event/tax.html:110
#, fuzzy
#| msgid "Base settings"
msgid "Tax settings"
msgstr "Configurações base"
msgstr "Configurações de impostos"
#: pretix/control/templates/pretixcontrol/event/tax_delete.html:4
#: pretix/control/templates/pretixcontrol/event/tax_delete.html:6
@@ -21980,6 +21935,9 @@ msgid ""
"your event. By default, we will only offer ticket downloads for these "
"products."
msgstr ""
"Cada compra deste produto representa uma pessoa que terá permissão de entrar "
"no seu evento. Por padrão, só oferecemos o download de ingressos para estes "
"produtos."
#: pretix/control/templates/pretixcontrol/item/create.html:33
#: pretix/control/templates/pretixcontrol/item/index.html:41
@@ -26144,7 +26102,7 @@ msgstr ""
#: pretix/control/templates/pretixcontrol/shredder/download.html:29
msgid "Download data"
msgstr ""
msgstr "Baixar dados"
#: pretix/control/templates/pretixcontrol/shredder/download.html:34
msgid "Step 2: Confirm deletion"
@@ -26475,7 +26433,7 @@ msgstr "Adicionar um dispositivo de autenticação de dois fatores"
#: pretix/control/templates/pretixcontrol/user/2fa_confirm_totp.html:8
msgid "To set up this device, please follow the following steps:"
msgstr ""
msgstr "Para configurar este dispositivo, por favor siga os passos a seguir:"
#: pretix/control/templates/pretixcontrol/user/2fa_confirm_totp.html:12
msgid "Download the Google Authenticator application to your phone:"
@@ -26901,11 +26859,11 @@ msgstr ""
#: pretix/control/templates/pretixcontrol/user/staff_session_edit.html:6
msgid "Session notes"
msgstr ""
msgstr "Notas de sessão"
#: pretix/control/templates/pretixcontrol/user/staff_session_edit.html:17
msgid "Audit log"
msgstr ""
msgstr "Log de auditoria"
#: pretix/control/templates/pretixcontrol/user/staff_session_edit.html:30
msgid "Method"
@@ -27949,7 +27907,7 @@ msgstr ""
#: pretix/control/views/item.py:237
msgid "The selected category has been deleted."
msgstr ""
msgstr "A categoria selecionada foi excluída"
#: pretix/control/views/item.py:322
msgid "The new category has been created."
@@ -29874,7 +29832,7 @@ msgstr ""
#: pretix/plugins/banktransfer/payment.py:239
msgid "Please fill out your bank account details."
msgstr ""
msgstr "Por favor, preencha os detalhes da sua conta bancária."
#: pretix/plugins/banktransfer/payment.py:243
msgid "Please enter your bank account details."
@@ -30175,7 +30133,7 @@ msgstr ""
#: pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/pending.html:122
msgid "Scan the QR code with your banking app"
msgstr ""
msgstr "Escanear o QR Code com o seu aplicativo bancário"
#: pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/refund_export.html:5
#: pretix/plugins/banktransfer/templates/pretixplugins/banktransfer/refund_export.html:7
@@ -30746,6 +30704,8 @@ msgid ""
"We're waiting for an answer from PayPal regarding your payment. Please "
"contact us, if this takes more than a few hours."
msgstr ""
"Estamos aguardando por informações do PayPal referentes ao seu pagamento. "
"Por favor, entre em contato conosco se isso demorar mais que algumas horas."
#: pretix/plugins/paypal/templates/pretixplugins/paypal/redirect.html:17
#: pretix/plugins/paypal2/templates/pretixplugins/paypal2/redirect.html:17
@@ -33370,19 +33330,17 @@ msgstr "Organizador: {organizer}"
#: pretix/presale/ical.py:139
#, python-brace-format
msgid "{event} - {item}"
msgstr ""
msgstr "{event} - {item}"
#: pretix/presale/ical.py:147
#, fuzzy, python-brace-format
#| msgid "Start date"
#, python-brace-format
msgid "Start: {datetime}"
msgstr "Data inicial"
msgstr "Início: {datetime}"
#: pretix/presale/ical.py:150
#, fuzzy, python-brace-format
#| msgid "Admission: {datetime}"
#, python-brace-format
msgid "End: {datetime}"
msgstr "Admissão: {datetime}"
msgstr "Término: {datetime}"
#: pretix/presale/templates/pretixpresale/base.html:44
#, fuzzy
@@ -35632,10 +35590,8 @@ msgid "The following gift cards are available in your customer account:"
msgstr ""
#: pretix/presale/templates/pretixpresale/giftcard/checkout.html:24
#, fuzzy
#| msgid "Issued gift cards"
msgid "Use gift card"
msgstr "Cartões-presente emitidos"
msgstr "Usar cartão-presente"
#: pretix/presale/templates/pretixpresale/giftcard/checkout_confirm.html:4
#, python-format
@@ -35754,10 +35710,9 @@ msgid "Expired since %(date)s"
msgstr "Expirado desde"
#: pretix/presale/templates/pretixpresale/organizers/customer_giftcards.html:46
#, fuzzy, python-format
#| msgid "Valid until %(datetime)s"
#, python-format
msgid "Valid until %(date)s"
msgstr "Válido até %(datetime)s"
msgstr "Válido até %(date)s"
#: pretix/presale/templates/pretixpresale/organizers/customer_giftcards.html:66
#, fuzzy
@@ -36287,10 +36242,8 @@ msgid "The selected date does not exist in this event series."
msgstr "A data selecionada não existe nesta série de eventos."
#: pretix/presale/views/widget.py:412
#, fuzzy
#| msgid "The selected seat \"{seat}\" is not available."
msgid "The selected date is not available."
msgstr "O assento selecionado \"{seat}\" não está disponível."
msgstr "A data selecionada não está disponível."
#: pretix/presale/views/widget.py:476
#, python-format

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 10:37+0000\n"
"PO-Revision-Date: 2025-08-28 13:43+0000\n"
"PO-Revision-Date: 2025-12-09 00:47+0000\n"
"Last-Translator: Renne Rocha <renne@rocha.dev.br>\n"
"Language-Team: Portuguese (Brazil) <https://translate.pretix.eu/projects/"
"pretix/pretix-js/pt_BR/>\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 5.13\n"
"X-Generator: Weblate 5.14.3\n"
#: pretix/plugins/banktransfer/static/pretixplugins/banktransfer/ui.js:56
#: pretix/plugins/banktransfer/static/pretixplugins/banktransfer/ui.js:62
@@ -566,11 +566,11 @@ msgstr "ausente"
#: pretix/static/pretixcontrol/js/ui/checkinrules.js:289
msgid "Error: Product not found!"
msgstr ""
msgstr "Erro: Produto não encontrado!"
#: pretix/static/pretixcontrol/js/ui/checkinrules.js:296
msgid "Error: Variation not found!"
msgstr ""
msgstr "Erro: Variação não encontrada!"
#: pretix/static/pretixcontrol/js/ui/editor.js:171
msgid "Check-in QR"

View File

@@ -41,15 +41,20 @@ for app in apps.get_app_configs():
if hasattr(app, 'PretixPluginMeta'):
if importlib.util.find_spec(app.name + '.urls'):
urlmod = importlib.import_module(app.name + '.urls')
single_plugin_patterns = []
if hasattr(urlmod, 'event_patterns'):
patterns = plugin_event_urls(urlmod.event_patterns, plugin=app.name)
raw_plugin_patterns.append(
re_path(r'^(?P<event>[^/]+)/', include((patterns, app.label)))
single_plugin_patterns.append(
re_path(r'^(?P<event>[^/]+)/', include(patterns))
)
if hasattr(urlmod, 'organizer_patterns'):
patterns = plugin_event_urls(urlmod.organizer_patterns, plugin=app.name)
single_plugin_patterns += plugin_event_urls(urlmod.organizer_patterns, plugin=app.name)
if single_plugin_patterns:
raw_plugin_patterns.append(
re_path(r'', include((patterns, app.label)))
re_path(r'', include((single_plugin_patterns, app.label)))
)
plugin_patterns = [

View File

@@ -42,15 +42,20 @@ for app in apps.get_app_configs():
if hasattr(app, 'PretixPluginMeta'):
if importlib.util.find_spec(app.name + '.urls'):
urlmod = importlib.import_module(app.name + '.urls')
if hasattr(urlmod, 'event_patterns'):
patterns = plugin_event_urls(urlmod.event_patterns, plugin=app.name)
raw_plugin_patterns.append(
re_path(r'^(?P<event>[^/]+)/', include((patterns, app.label)))
)
single_plugin_patterns = []
if hasattr(urlmod, 'organizer_patterns'):
patterns = plugin_event_urls(urlmod.organizer_patterns, plugin=app.name)
single_plugin_patterns += plugin_event_urls(urlmod.organizer_patterns, plugin=app.name)
if hasattr(urlmod, 'event_patterns'):
plugin_event_patterns = plugin_event_urls(urlmod.event_patterns, plugin=app.name)
single_plugin_patterns.append(
re_path(r'^(?P<event>[^/]+)/', include(plugin_event_patterns))
)
if single_plugin_patterns:
raw_plugin_patterns.append(
re_path(r'', include((patterns, app.label)))
re_path(r'', include((single_plugin_patterns, app.label)))
)
plugin_patterns = [

View File

@@ -34,8 +34,10 @@
import json
import logging
import operator
import re
from decimal import Decimal
from functools import reduce
import dateutil.parser
from celery.exceptions import MaxRetriesExceededError
@@ -117,20 +119,26 @@ def _find_order_for_code(base_qs, code):
pass
def _find_order_for_invoice_id(base_qs, prefix, number):
def _find_order_for_invoice_id(base_qs, prefixes, number):
try:
# Working with __iregex here is an experiment, if this turns out to be too slow in production
# we might need to switch to a different approach.
r = [
Q(
prefix__istartswith=prefix, # redundant, but hopefully makes it a little faster
full_invoice_no__iregex=prefix + r'[\- ]*0*' + number
)
for prefix in set(prefixes)
]
return base_qs.select_related('order').get(
prefix__istartswith=prefix, # redundant, but hopefully makes it a little faster
full_invoice_no__iregex=prefix + r'[\- ]*0*' + number
reduce(operator.or_, r)
).order
except (Invoice.DoesNotExist, Invoice.MultipleObjectsReturned):
pass
@transaction.atomic
def _handle_transaction(trans: BankTransaction, matches: tuple, event: Event = None, organizer: Organizer = None):
def _handle_transaction(trans: BankTransaction, matches: tuple, regex_match_to_slug, event: Event = None, organizer: Organizer = None):
orders = []
if event:
for slug, code in matches:
@@ -139,18 +147,19 @@ def _handle_transaction(trans: BankTransaction, matches: tuple, event: Event = N
if order.code not in {o.code for o in orders}:
orders.append(order)
else:
order = _find_order_for_invoice_id(Invoice.objects.filter(event=event), slug, code)
order = _find_order_for_invoice_id(Invoice.objects.filter(event=event), (slug, regex_match_to_slug.get(slug, slug)), code)
if order and order.code not in {o.code for o in orders}:
orders.append(order)
else:
qs = Order.objects.filter(event__organizer=organizer)
for slug, code in matches:
order = _find_order_for_code(qs.filter(event__slug__iexact=slug), code)
original_slug = regex_match_to_slug.get(slug, slug)
order = _find_order_for_code(qs.filter(Q(event__slug__iexact=slug) | Q(event__slug__iexact=original_slug)), code)
if order:
if order.code not in {o.code for o in orders}:
orders.append(order)
else:
order = _find_order_for_invoice_id(Invoice.objects.filter(event__organizer=organizer), slug, code)
order = _find_order_for_invoice_id(Invoice.objects.filter(event__organizer=organizer), (slug, original_slug), code)
if order and order.code not in {o.code for o in orders}:
orders.append(order)
@@ -366,22 +375,37 @@ def process_banktransfers(self, job: int, data: list) -> None:
transactions = _get_unknown_transactions(job, data, **job.owner_kwargs)
# Match order codes
regex_match_to_slug = {}
code_len_agg = Order.objects.filter(event__organizer=job.organizer).annotate(
clen=Length('code')
).aggregate(min=Min('clen'), max=Max('clen'))
if job.event:
prefixes = {job.event.slug.upper()}
prefixes = {job.event.slug.upper(), job.event.slug.upper().replace("-", "")}
if "-" in job.event.slug:
regex_match_to_slug[job.event.slug.upper().replace("-", "")] = job.event.slug
else:
prefixes = {e.slug.upper() for e in job.organizer.events.all()}
prefixes = set()
for e in job.organizer.events.all():
prefixes.add(e.slug.upper())
if "-" in e.slug:
prefixes.add(e.slug.upper().replace("-", ""))
regex_match_to_slug[e.slug.upper().replace("-", "")] = e.slug
# Match invoice numbers
inr_len_agg = Invoice.objects.filter(event__organizer=job.organizer).annotate(
clen=Length('invoice_no')
).aggregate(min=Min('clen'), max=Max('clen'))
if job.event:
prefixes |= {p.rstrip(' -') for p in Invoice.objects.filter(event=job.event).distinct().values_list('prefix', flat=True)}
invoice_prefixes = Invoice.objects.filter(event=job.event)
else:
prefixes |= {p.rstrip(' -') for p in Invoice.objects.filter(event__organizer=job.organizer).distinct().values_list('prefix', flat=True)}
invoice_prefixes = Invoice.objects.filter(event__organizer=job.organizer)
for p in invoice_prefixes.order_by().distinct().values_list('prefix', flat=True):
prefix = p.rstrip(" -")
prefixes.add(prefix)
if "-" in prefix:
prefix_nodash = prefix.replace("-", "")
prefixes.add(prefix_nodash)
regex_match_to_slug[prefix_nodash] = prefix
pattern = re.compile(
"(%s)[ \\-_]*([A-Z0-9]{%s,%s})" % (
@@ -395,6 +419,11 @@ def process_banktransfers(self, job: int, data: list) -> None:
)
for trans in transactions:
if trans.amount == Decimal("0.00"):
# Ignore all zero-valued transactions
trans.state = BankTransaction.STATE_DISCARDED
trans.save()
continue
# Whitespace in references is unreliable since linebreaks and spaces can occur almost anywhere, e.g.
# DEMOCON-123\n45 should be matched to DEMOCON-12345. However, sometimes whitespace is important,
# e.g. when there are two references. "DEMOCON-12345 DEMOCON-45678" would otherwise be parsed as
@@ -409,9 +438,9 @@ def process_banktransfers(self, job: int, data: list) -> None:
if matches:
if job.event:
_handle_transaction(trans, matches, event=job.event)
_handle_transaction(trans, matches, regex_match_to_slug, event=job.event)
else:
_handle_transaction(trans, matches, organizer=job.organizer)
_handle_transaction(trans, matches, regex_match_to_slug, organizer=job.organizer)
else:
trans.state = BankTransaction.STATE_NOMATCH
trans.save()

View File

@@ -412,6 +412,18 @@ class StripeSettingsHolder(BasePaymentProvider):
'before they work properly.'),
required=False,
)),
('method_pay_by_bank',
forms.BooleanField(
label=_('Pay by bank'),
disabled=self.event.currency not in ['EUR', 'GBP'],
help_text=' '.join([
str(_('Some payment methods might need to be enabled in the settings of your Stripe account '
'before they work properly.')),
str(_('Currently only available for charges in GBP and customers with UK bank accounts, and '
'in private preview for France and Germany.'))
]),
required=False,
)),
('method_wechatpay',
forms.BooleanField(
label=_('WeChat Pay'),
@@ -1810,6 +1822,32 @@ class StripeRevolutPay(StripeRedirectMethod):
}
class StripePayByBank(StripeRedirectMethod):
identifier = 'stripe_pay_by_bank'
verbose_name = _('Pay by bank via Stripe')
public_name = _('Pay by bank')
method = 'pay_by_bank'
redirect_in_widget_allowed = False
confirmation_method = 'automatic'
explanation = _(
'Pay by bank allows you to authorize a secure Open Banking payment from your banking app. Currently available '
'only with a UK bank account.'
)
def is_allowed(self, request: HttpRequest, total: Decimal=None) -> bool:
return super().is_allowed(request, total) and self.event.currency == 'GBP'
def _payment_intent_kwargs(self, request, payment):
return {
"payment_method_data": {
"type": "pay_by_bank",
"billing_details": {
"email": payment.order.email,
},
},
}
class StripePayPal(StripeRedirectMethod):
identifier = 'stripe_paypal'
verbose_name = _('PayPal via Stripe')

View File

@@ -38,7 +38,6 @@ from pretix.base.signals import (
)
from pretix.control.signals import nav_organizer
from pretix.plugins.stripe.forms import StripeKeyValidator
from pretix.plugins.stripe.payment import StripeMethod
from pretix.presale.signals import html_head, process_response
@@ -47,15 +46,15 @@ def register_payment_provider(sender, **kwargs):
from .payment import (
StripeAffirm, StripeAlipay, StripeBancontact, StripeCC, StripeEPS,
StripeGiropay, StripeIdeal, StripeKlarna, StripeMobilePay,
StripeMultibanco, StripePayPal, StripePrzelewy24, StripeRevolutPay,
StripeSEPADirectDebit, StripeSettingsHolder, StripeSofort, StripeSwish,
StripeTwint, StripeWeChatPay,
StripeMultibanco, StripePayByBank, StripePayPal, StripePrzelewy24,
StripeRevolutPay, StripeSEPADirectDebit, StripeSettingsHolder,
StripeSofort, StripeSwish, StripeTwint, StripeWeChatPay,
)
return [
StripeSettingsHolder, StripeCC, StripeGiropay, StripeIdeal, StripeAlipay, StripeBancontact,
StripeSofort, StripeEPS, StripeMultibanco, StripePrzelewy24, StripeRevolutPay, StripeWeChatPay,
StripeSEPADirectDebit, StripeAffirm, StripeKlarna, StripePayPal, StripeSwish, StripeTwint, StripeMobilePay
StripeSEPADirectDebit, StripeAffirm, StripeKlarna, StripePayByBank, StripePayPal, StripeSwish, StripeTwint, StripeMobilePay
]
@@ -189,6 +188,8 @@ def nav_o(sender, request, organizer, **kwargs):
@receiver(signal=process_response, dispatch_uid="stripe_middleware_resp")
def signal_process_response(sender, request: HttpRequest, response: HttpResponse, **kwargs):
from pretix.plugins.stripe.payment import StripeMethod
provider = StripeMethod(sender)
url = resolve(request.path_info)

View File

@@ -22,7 +22,6 @@
import logging
from urllib.parse import urlsplit
import stripe
from django.conf import settings
from pretix.base.services.tasks import EventTask
@@ -50,7 +49,10 @@ def get_stripe_account_key(prov):
@app.task(base=EventTask, max_retries=5, default_retry_delay=1)
def stripe_verify_domain(event, domain):
import stripe
from pretix.plugins.stripe.payment import StripeCC
prov = StripeCC(event)
account = get_stripe_account_key(prov)

View File

@@ -37,7 +37,6 @@ import logging
import urllib.parse
import requests
import stripe
from django.contrib import messages
from django.core import signing
from django.db import transaction
@@ -68,7 +67,6 @@ from pretix.helpers.http import redirect_to_url
from pretix.multidomain.urlreverse import build_absolute_uri, eventreverse
from pretix.plugins.stripe.forms import OrganizerStripeSettingsForm
from pretix.plugins.stripe.models import ReferencedStripeObject
from pretix.plugins.stripe.payment import StripeCC, StripeSettingsHolder
from pretix.plugins.stripe.tasks import (
get_domain_for_event, stripe_verify_domain,
)
@@ -100,6 +98,8 @@ def redirect_view(request, *args, **kwargs):
@scopes_disabled()
def oauth_return(request, *args, **kwargs):
import stripe
if 'payment_stripe_oauth_event' not in request.session:
messages.error(request, _('An error occurred during connecting with Stripe, please try again.'))
return redirect('control:index')
@@ -268,6 +268,10 @@ SOURCE_TYPES = {
def charge_webhook(event, event_json, charge_id, rso):
import stripe
from pretix.plugins.stripe.payment import StripeCC
prov = StripeCC(event)
prov._init_api()
@@ -371,6 +375,10 @@ def charge_webhook(event, event_json, charge_id, rso):
def source_webhook(event, event_json, source_id, rso):
import stripe
from pretix.plugins.stripe.payment import StripeCC
prov = StripeCC(event)
prov._init_api()
try:
@@ -440,6 +448,10 @@ def source_webhook(event, event_json, source_id, rso):
def paymentintent_webhook(event, event_json, paymentintent_id, rso):
import stripe
from pretix.plugins.stripe.payment import StripeCC
prov = StripeCC(event)
prov._init_api()
@@ -516,6 +528,8 @@ class StripeOrderView:
@method_decorator(xframe_options_exempt, 'dispatch')
class ReturnView(StripeOrderView, View):
def get(self, request, *args, **kwargs):
import stripe
prov = self.pprov
prov._init_api()
try:
@@ -568,6 +582,10 @@ class ReturnView(StripeOrderView, View):
class ScaView(StripeOrderView, View):
def get(self, request, *args, **kwargs):
import stripe
from pretix.plugins.stripe.payment import StripeSettingsHolder
prov = self.pprov
prov._init_api()

View File

@@ -435,7 +435,7 @@ def cart_session(request):
@method_decorator(allow_frame_if_namespaced, 'dispatch')
class CartApplyVoucher(EventViewMixin, CartActionMixin, AsyncAction, View):
task = apply_voucher
known_errortypes = ['CartError']
known_errortypes = ['CartError', 'CartPositionError']
def get_success_message(self, value):
return _('We applied the voucher to as many products in your cart as we could.')
@@ -513,7 +513,7 @@ class CartApplyVoucher(EventViewMixin, CartActionMixin, AsyncAction, View):
@method_decorator(allow_frame_if_namespaced, 'dispatch')
class CartRemove(EventViewMixin, CartActionMixin, AsyncAction, View):
task = remove_cart_position
known_errortypes = ['CartError']
known_errortypes = ['CartError', 'CartPositionError']
def get_success_message(self, value):
if CartPosition.objects.filter(cart_id=get_or_create_cart_id(self.request)).exists():
@@ -542,7 +542,7 @@ class CartRemove(EventViewMixin, CartActionMixin, AsyncAction, View):
@method_decorator(allow_frame_if_namespaced, 'dispatch')
class CartClear(EventViewMixin, CartActionMixin, AsyncAction, View):
task = clear_cart
known_errortypes = ['CartError']
known_errortypes = ['CartError', 'CartPositionError']
def get_success_message(self, value):
create_empty_cart_id(self.request)
@@ -556,7 +556,7 @@ class CartClear(EventViewMixin, CartActionMixin, AsyncAction, View):
@method_decorator(allow_frame_if_namespaced, 'dispatch')
class CartExtendReservation(EventViewMixin, CartActionMixin, AsyncAction, View):
task = extend_cart_reservation
known_errortypes = ['CartError']
known_errortypes = ['CartError', 'CartPositionError']
def _ajax_response_data(self, value):
if isinstance(value, dict):
@@ -566,7 +566,11 @@ class CartExtendReservation(EventViewMixin, CartActionMixin, AsyncAction, View):
def get_success_message(self, value):
if value['success'] > 0:
return _('Your cart timeout was extended.')
if value.get('price_changed'):
return _('Your cart timeout was extended. Please note that some of the prices in your cart '
'changed.')
else:
return _('Your cart timeout was extended.')
def post(self, request, *args, **kwargs):
return self.do(self.request.event.id, get_or_create_cart_id(self.request), translation.get_language(),
@@ -578,7 +582,7 @@ class CartExtendReservation(EventViewMixin, CartActionMixin, AsyncAction, View):
@method_decorator(iframe_entry_view_wrapper, 'dispatch')
class CartAdd(EventViewMixin, CartActionMixin, AsyncAction, View):
task = add_items_to_cart
known_errortypes = ['CartError']
known_errortypes = ['CartError', 'CartPositionError']
def get_success_message(self, value):
return _('The products have been successfully added to your cart.')

View File

@@ -49,7 +49,7 @@ from django.views.decorators.cache import cache_page
from django.views.decorators.gzip import gzip_page
from django.views.decorators.http import condition
from django.views.i18n import (
JavaScriptCatalog, get_formats, builtin_template_path,
JavaScriptCatalog, get_formats, js_catalog_template,
)
from lxml import html
@@ -168,8 +168,7 @@ def generate_widget_js(version, lang):
'September', 'October', 'November', 'December'
)
catalog = dict((k, v) for k, v in catalog.items() if k.startswith('widget\u0004') or k in str_wl)
with builtin_template_path("i18n_catalog.js").open(encoding="utf-8") as fh:
template = Engine().from_string(fh.read())
template = Engine().from_string(js_catalog_template)
context = Context({
'catalog_str': indent(json.dumps(
catalog, sort_keys=True, indent=2)) if catalog else None,

View File

@@ -530,7 +530,6 @@ X_FRAME_OPTIONS = 'DENY'
# URL settings
ROOT_URLCONF = 'pretix.multidomain.maindomain_urlconf'
FORMS_URLFIELD_ASSUME_HTTPS = True # transitional for django 6.0
WSGI_APPLICATION = 'pretix.wsgi.application'

View File

@@ -745,6 +745,8 @@ def test_use_membership(event, customer, membership, requiring_ticket):
item=requiring_ticket, price=23, expires=now() + timedelta(days=1), event=event, cart_id="123",
used_membership=membership
)
q = event.quotas.create(size=None, name="foo")
q.items.add(requiring_ticket)
order = _create_order(event, email='dummy@example.org', positions=[cp1],
now_dt=now(),
sales_channel=event.organizer.sales_channels.get(identifier="web"),
@@ -767,6 +769,8 @@ def test_use_membership_invalid(event, customer, membership, requiring_ticket):
membership.date_start -= timedelta(days=100)
membership.date_end -= timedelta(days=100)
membership.save()
q = event.quotas.create(size=None, name="foo")
q.items.add(requiring_ticket)
cp1 = CartPosition.objects.create(
item=requiring_ticket, price=23, expires=now() + timedelta(days=1), event=event, cart_id="123",
used_membership=membership

View File

@@ -45,6 +45,8 @@ def env():
def test_event_main_domain_front_page(env):
assert eventreverse(env[1], 'presale:event.index') == '/mrmcd/2015/'
assert eventreverse(env[0], 'presale:organizer.index') == '/mrmcd/'
assert eventreverse(env[1], 'plugins:testdummy:view') == '/mrmcd/2015/testdummy'
assert eventreverse(env[0], 'plugins:testdummy:view') == '/mrmcd/testdummy'
@pytest.mark.django_db
@@ -52,12 +54,16 @@ def test_event_custom_domain_kwargs(env):
KnownDomain.objects.create(domainname='foobar', organizer=env[0])
KnownDomain.objects.create(domainname='barfoo', organizer=env[0], event=env[1])
assert eventreverse(env[1], 'presale:event.checkout', {'step': 'payment'}) == 'http://barfoo/checkout/payment/'
assert eventreverse(env[0], 'plugins:testdummy:view') == 'http://foobar/testdummy'
assert eventreverse(env[1], 'plugins:testdummy:view') == 'http://barfoo/testdummy'
@pytest.mark.django_db
def test_event_org_domain_kwargs(env):
KnownDomain.objects.create(domainname='foobar', organizer=env[0])
assert eventreverse(env[1], 'presale:event.checkout', {'step': 'payment'}) == 'http://foobar/2015/checkout/payment/'
assert eventreverse(env[0], 'plugins:testdummy:view') == 'http://foobar/testdummy'
assert eventreverse(env[1], 'plugins:testdummy:view') == 'http://foobar/2015/testdummy'
@pytest.mark.django_db
@@ -65,9 +71,13 @@ def test_event_org_alt_domain_kwargs(env):
KnownDomain.objects.create(domainname='foobar', organizer=env[0])
d = KnownDomain.objects.create(domainname='altfoo', organizer=env[0], mode=KnownDomain.MODE_ORG_ALT_DOMAIN)
assert eventreverse(env[1], 'presale:event.checkout', {'step': 'payment'}) == 'http://foobar/2015/checkout/payment/'
assert eventreverse(env[1], 'plugins:testdummy:view') == 'http://foobar/2015/testdummy'
d.event_assignments.create(event=env[1])
with scopes_disabled():
assert eventreverse(Event.objects.get(pk=env[1].pk), 'presale:event.checkout', {'step': 'payment'}) == 'http://altfoo/2015/checkout/payment/'
event = Event.objects.get(pk=env[1].pk)
assert eventreverse(event, 'presale:event.checkout', {'step': 'payment'}) == 'http://altfoo/2015/checkout/payment/'
assert eventreverse(env[0], 'plugins:testdummy:view') == 'http://foobar/testdummy'
assert eventreverse(event, 'plugins:testdummy:view') == 'http://altfoo/2015/testdummy'
@pytest.mark.django_db

View File

@@ -385,6 +385,20 @@ def test_mark_paid_organizer_dash_in_slug(env, orga_job):
assert env[2].status == Order.STATUS_PAID
@pytest.mark.django_db
def test_mark_paid_organizer_dash_in_slug_missing(env, orga_job):
env[0].slug = "foo-bar"
env[0].save()
process_banktransfers(orga_job, [{
'payer': 'Karla Kundin',
'reference': 'Bestellung FOOBAR1234S',
'date': '2016-01-26',
'amount': '23.00'
}])
env[2].refresh_from_db()
assert env[2].status == Order.STATUS_PAID
@pytest.mark.django_db
def test_mark_paid_organizer_varying_order_code_length(env, orga_job):
env[2].code = "123412341234"
@@ -490,7 +504,7 @@ def test_valid_plus_invalid_match(env, orga_job):
'payer': 'Karla Kundin',
'reference': 'Bestellungen DUMMY-1Z3AS DUMMY-99999',
'date': '2016-01-26',
'amount': '.00'
'amount': '2.00'
}])
with scopes_disabled():
job = BankImportJob.objects.last()

View File

@@ -1428,6 +1428,27 @@ class CartTest(CartTestMixin, TestCase):
self.assertEqual(cp2.expires, now() + self.cart_reservation_time)
self.assertEqual(cp2.max_extend, now() + 11 * self.cart_reservation_time)
def test_expired_cart_extend_price_change_note(self):
start_time = datetime.datetime(2024, 1, 1, 10, 00, 00, tzinfo=datetime.timezone.utc)
max_extend = start_time + 11 * self.cart_reservation_time
with scopes_disabled():
cp1 = CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.ticket,
price=23, expires=max_extend, max_extend=max_extend
)
cp1.update_listed_price_and_voucher()
self.ticket.default_price = Decimal("25.00")
self.ticket.save()
with freezegun.freeze_time(max_extend + timedelta(hours=1)):
response = self.client.post('/%s/%s/cart/extend' % (self.orga.slug, self.event.slug), {
}, follow=True)
doc = BeautifulSoup(response.rendered_content, "lxml")
self.assertIn('some of the prices in your cart changed', doc.select('.alert-success')[0].text)
with scopes_disabled():
cp1.refresh_from_db()
self.assertEqual(cp1.price, Decimal("25.00"))
self.assertEqual(cp1.expires, now() + self.cart_reservation_time)
def test_expired_cart_extend_fails_partially_on_bundled(self):
start_time = datetime.datetime(2024, 1, 1, 10, 00, 00, tzinfo=datetime.timezone.utc)
max_extend = start_time + 11 * self.cart_reservation_time
@@ -3408,6 +3429,22 @@ class CartAddonTest(CartTestMixin, TestCase):
assert cp2.expires > now()
assert cp2.addon_to_id == cp1.pk
@classscope(attr='orga')
def test_expand_expired_price_change(self):
cp1 = CartPosition.objects.create(
expires=now() - timedelta(minutes=10), max_extend=now() + 10 * self.cart_reservation_time,
item=self.ticket, price=Decimal('23.00'),
event=self.event, cart_id=self.session_key
)
self.ticket.default_price = Decimal("25.00")
self.ticket.save()
self.cm.extend_expired_positions()
self.cm.commit()
cp1.refresh_from_db()
assert cp1.expires > now()
assert cp1.listed_price == Decimal("25.00")
assert cp1.price == Decimal("25.00")
@classscope(attr='orga')
def test_expand_expired_refresh_voucher(self):
v = Voucher.objects.create(item=self.ticket, value=Decimal('20.00'), event=self.event, price_mode='set',
@@ -4080,6 +4117,8 @@ class CartBundleTest(CartTestMixin, TestCase):
@classscope(attr='orga')
def test_extend_bundled_and_addon(self):
self.trans.require_bundling = False
self.trans.save()
cp = CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.ticket,
price=21.5, expires=now() - timedelta(minutes=10), max_extend=now() + 10 * self.cart_reservation_time

View File

@@ -2669,7 +2669,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.save()
with scopes_disabled():
se = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.ticket)
cr1 = CartPosition.objects.create(
@@ -2839,8 +2839,8 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
with scopes_disabled():
self.event.has_subevents = True
self.event.save()
se = self.event.subevents.create(name='Foo', date_from=now())
se2 = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
se2 = self.event.subevents.create(name='Foo', date_from=now(), active=True)
self.quota_tickets.size = 0
self.quota_tickets.subevent = se2
self.quota_tickets.save()
@@ -2880,7 +2880,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.save()
with scopes_disabled():
se = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.ticket)
SubEventItem.objects.create(subevent=se, item=self.ticket, price=24)
@@ -2901,7 +2901,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.save()
with scopes_disabled():
se = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.ticket)
SubEventItem.objects.create(subevent=se, item=self.ticket, price=24, disabled=True)
@@ -2919,7 +2919,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.save()
with scopes_disabled():
se = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.workshop2)
q.variations.add(self.workshop2b)
@@ -2938,7 +2938,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.save()
with scopes_disabled():
se = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.ticket)
SubEventItem.objects.create(subevent=se, item=self.ticket, price=24, available_until=now() - timedelta(days=1))
@@ -2956,7 +2956,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.save()
with scopes_disabled():
se = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.workshop2)
q.variations.add(self.workshop2b)
@@ -3735,8 +3735,8 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.save()
with scopes_disabled():
se = self.event.subevents.create(name='Foo', date_from=now())
se2 = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
se2 = self.event.subevents.create(name='Foo', date_from=now(), active=True)
self.quota_tickets.size = 10
self.quota_tickets.subevent = se2
self.quota_tickets.save()
@@ -4165,7 +4165,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
with scopes_disabled():
self.event.has_subevents = True
self.event.save()
se = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
self.workshopquota.size = 1
self.workshopquota.subevent = se
self.workshopquota.save()
@@ -4214,7 +4214,10 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.settings.display_net_prices = True
self.event.save()
se = self.event.subevents.create(name='Foo', date_from=now(), presale_start=now() + datetime.timedelta(days=1))
se = self.event.subevents.create(name='Foo', date_from=now(), presale_start=now() + datetime.timedelta(days=1),
active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.ticket)
CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.ticket,
price=23, expires=now() + timedelta(minutes=10), subevent=se
@@ -4224,7 +4227,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
response = self.client.post('/%s/%s/checkout/confirm/' % (self.orga.slug, self.event.slug), follow=True)
doc = BeautifulSoup(response.content.decode(), "lxml")
self.assertGreaterEqual(len(doc.select(".alert-danger")), 1)
assert 'booking period for one of the events in your cart has not yet started.' in response.content.decode()
assert 'booking period for this event has not yet started.' in response.content.decode()
with scopes_disabled():
assert not CartPosition.objects.filter(cart_id=self.session_key).exists()
@@ -4233,7 +4236,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.has_subevents = True
self.event.settings.display_net_prices = True
self.event.save()
se = self.event.subevents.create(name='Foo', date_from=now(), presale_end=now() - datetime.timedelta(days=1))
se = self.event.subevents.create(name='Foo', date_from=now(), presale_end=now() - datetime.timedelta(days=1), active=True)
CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.ticket,
price=23, expires=now() + timedelta(minutes=10), subevent=se
@@ -4243,7 +4246,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
response = self.client.post('/%s/%s/checkout/confirm/' % (self.orga.slug, self.event.slug), follow=True)
doc = BeautifulSoup(response.content.decode(), "lxml")
self.assertGreaterEqual(len(doc.select(".alert-danger")), 1)
assert 'booking period for one of the events in your cart has ended.' in response.content.decode()
assert 'The booking period for this event has ended.' in response.content.decode()
with scopes_disabled():
assert not CartPosition.objects.filter(cart_id=self.session_key).exists()
@@ -4253,7 +4256,9 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.settings.display_net_prices = True
self.event.save()
self.event.settings.payment_term_last = 'RELDATE/1/23:59:59/date_from/'
se = self.event.subevents.create(name='Foo', date_from=now())
se = self.event.subevents.create(name='Foo', date_from=now(), active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.ticket)
CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.ticket,
price=23, expires=now() + timedelta(minutes=10), subevent=se
@@ -4263,7 +4268,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
response = self.client.post('/%s/%s/checkout/confirm/' % (self.orga.slug, self.event.slug), follow=True)
doc = BeautifulSoup(response.content.decode(), "lxml")
self.assertGreaterEqual(len(doc.select(".alert-danger")), 1)
assert 'booking period for one of the events in your cart has ended.' in response.content.decode()
assert 'All payments for this event need to be confirmed already, so no new orders can be created.' in response.content.decode()
with scopes_disabled():
assert not CartPosition.objects.filter(cart_id=self.session_key).exists()
@@ -4272,7 +4277,10 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.event.date_to = now() - datetime.timedelta(days=1)
self.event.save()
with scopes_disabled():
se = self.event.subevents.create(name='Foo', date_from=now(), presale_end=now() + datetime.timedelta(days=1))
se = self.event.subevents.create(name='Foo', date_from=now(), presale_end=now() + datetime.timedelta(days=1),
active=True)
q = se.quotas.create(name="foo", size=None, event=self.event)
q.items.add(self.ticket)
CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.ticket,
price=23, expires=now() + timedelta(minutes=10), subevent=se
@@ -4283,6 +4291,25 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
doc = BeautifulSoup(response.content.decode(), "lxml")
self.assertEqual(len(doc.select(".thank-you")), 1)
def test_confirm_subevent_disabled(self):
with scopes_disabled():
self.event.has_subevents = True
self.event.settings.display_net_prices = True
self.event.save()
se = self.event.subevents.create(name='Foo', date_from=now(), active=False)
CartPosition.objects.create(
event=self.event, cart_id=self.session_key, item=self.ticket,
price=23, expires=now() + timedelta(minutes=10), subevent=se
)
self._set_payment()
response = self.client.post('/%s/%s/checkout/confirm/' % (self.orga.slug, self.event.slug), follow=True)
doc = BeautifulSoup(response.content.decode(), "lxml")
self.assertGreaterEqual(len(doc.select(".alert-danger")), 1)
assert 'selected event date is not active.' in response.content.decode()
with scopes_disabled():
assert not CartPosition.objects.filter(cart_id=self.session_key).exists()
def test_before_presale_timemachine(self):
self._login_with_permission(self.orga)
self._enable_test_mode()
@@ -4497,6 +4524,8 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
self.assertEqual(Order.objects.first().locale, 'de')
def test_variation_require_approval(self):
self.workshop2.category = None
self.workshop2.save()
self.workshop2a.require_approval = True
self.workshop2a.save()
with scopes_disabled():
@@ -4518,6 +4547,7 @@ class CheckoutTestCase(BaseCheckoutTestCase, TimemachineTestMixin, TestCase):
def test_item_with_variations_require_approval(self):
self.workshop2.require_approval = True
self.workshop2.category = None
self.workshop2.save()
with scopes_disabled():
cr1 = CartPosition.objects.create(

View File

@@ -0,0 +1,52 @@
#
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 Raphael Michel and contributors
# Copyright (C) 2020-today pretix GmbH and contributors
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by the Free Software Foundation in version 3 of the License.
#
# ADDITIONAL TERMS APPLY: Pursuant to Section 7 of the GNU Affero General Public License, additional terms are
# applicable granting you additional permissions and placing additional restrictions on your usage of this software.
# Please refer to the pretix LICENSE file to obtain the full terms applicable to this work. If you did not receive
# this file, see <https://pretix.eu/about/en/license>.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# 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/>.
#
from django.http import HttpResponse
from django.urls import path
def view(request):
return HttpResponse("")
urlpatterns = [
path(
"testdummy",
view,
name="view",
),
]
organizer_patterns = [
path(
"testdummy",
view,
name="view",
),
]
event_patterns = [
path(
"testdummy",
view,
name="view",
),
]