Repository: pretix/pretix

Issue:
Internal Server Error when saving items in some scenarios
<!-- Please only create issues for bug reports. Feature requests or general questions should start as a "Discussion" on GitHub. -->

**Describe the bug**

```
ERROR 2021-04-18 16:32:14,282 django.request log Internal Server Error: /control/event/script/shop/items/add
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/pretix/src/pretix/control/permissions.py", line 69, in wrapper
    return function(request, *args, **kw)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/base.py", line 97, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/edit.py", line 172, in post
    return super().post(request, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/edit.py", line 142, in post
    return self.form_valid(form)
  File "/usr/local/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/pretix/src/pretix/control/views/item.py", line 1148, in form_valid
    ret = super().form_valid(form)
  File "/usr/local/lib/python3.8/site-packages/django/views/generic/edit.py", line 125, in form_valid
    self.object = form.save()
  File "/pretix/src/pretix/control/forms/item.py", line 418, in save
    multiple_allowed=a.multiple_allowed)
AttributeError: 'ItemAddOn' object has no attribute 'multiple_allowed'
```

Relevant line: https://github.com/pretix/pretix/blob/3831ddec9361803a86d76976b7a2c7b3c8588141/src/pretix/control/forms/item.py#L418

**Expected behavior**
Not an Internal Server Error.



Discussion:
Probably introduced by https://github.com/pretix/pretix/commit/3831ddec9361803a86d76976b7a2c7b3c8588141
Is it a typo? It should be multi_allowed instead of multiple_allowed.

Resolving patch:
diff --git a/src/pretix/control/forms/item.py b/src/pretix/control/forms/item.py
--- a/src/pretix/control/forms/item.py
+++ b/src/pretix/control/forms/item.py
@@ -415,7 +415,7 @@ def save(self, *args, **kwargs):
             for a in self.cleaned_data['copy_from'].addons.all():
                 instance.addons.create(addon_category=a.addon_category, min_count=a.min_count, max_count=a.max_count,
                                        price_included=a.price_included, position=a.position,
-                                       multiple_allowed=a.multiple_allowed)
+                                       multi_allowed=a.multi_allowed)
             for b in self.cleaned_data['copy_from'].bundles.all():
                 instance.bundles.create(bundled_item=b.bundled_item, bundled_variation=b.bundled_variation,
                                         count=b.count, designated_price=b.designated_price)


Test patch: