Item form: Prevent combining validity_mode with gift cards (#4187)

This commit is contained in:
Raphael Michel
2024-06-04 11:57:49 +02:00
committed by GitHub
parent d463878514
commit 90ce802a33

View File

@@ -698,6 +698,14 @@ class ItemUpdateForm(I18nModelForm):
'tax_rule',
_("Gift card products should use a tax rule with a rate of 0 percent since sales tax will be applied when the gift card is redeemed.")
)
if d.get('validity_mode'):
self.add_error(
'validity_mode',
_(
"Do not set a specific validity for gift card products as it will not restrict the validity "
"of the gift card. A validity of gift cards can be set in your organizer settings."
)
)
if d.get('admission'):
self.add_error(
'admission',