Fix missing attributes in copying products

This commit is contained in:
Raphael Michel
2017-04-21 15:07:32 +02:00
parent f639d2aa57
commit 2c96a26d91
2 changed files with 4 additions and 0 deletions

View File

@@ -231,6 +231,8 @@ class Item(LoggedModel):
'empty or set it to 0, there is no special limit for this product. The limit for the maximum '
'number of items in the whole order applies regardless.')
)
# !!! Attention: If you add new fields here, also add them to the copying code in
# pretix/control/views/item.py if applicable.
class Meta:
verbose_name = _("Product")

View File

@@ -801,6 +801,8 @@ class ItemCreate(EventPermissionRequiredMixin, CreateView):
form.instance.require_voucher = form.cleaned_data['copy_from'].require_voucher
form.instance.hide_without_voucher = form.cleaned_data['copy_from'].hide_without_voucher
form.instance.allow_cancel = form.cleaned_data['copy_from'].allow_cancel
form.instance.min_per_order = form.cleaned_data['copy_from'].min_per_order
form.instance.max_per_order = form.cleaned_data['copy_from'].max_per_order
ret = super().form_valid(form)
form.instance.log_action('pretix.event.item.added', user=self.request.user, data={