mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Make product.tax_rule required as soon as tax rules exist to avoid users from screwing up their taxes
This commit is contained in:
@@ -206,6 +206,8 @@ class ItemCreateForm(I18nModelForm):
|
||||
empty_label=_('Do not copy'),
|
||||
required=False
|
||||
)
|
||||
if self.event.tax_rules.exists():
|
||||
self.fields['tax_rule'].required = True
|
||||
|
||||
if not self.event.has_subevents:
|
||||
choices = [
|
||||
@@ -364,6 +366,8 @@ class ItemUpdateForm(I18nModelForm):
|
||||
'over 65. This ticket includes access to all parts of the event, except the VIP '
|
||||
'area.'
|
||||
)
|
||||
if self.event.tax_rules.exists():
|
||||
self.fields['tax_rule'].required = True
|
||||
self.fields['description'].widget.attrs['rows'] = '4'
|
||||
self.fields['sales_channels'] = forms.MultipleChoiceField(
|
||||
label=_('Sales channels'),
|
||||
|
||||
Reference in New Issue
Block a user