Model field

This commit is contained in:
Raphael Michel
2018-08-09 17:18:36 +02:00
parent 0cbacbb959
commit f52447ff58
4 changed files with 29 additions and 0 deletions

View File

@@ -193,6 +193,8 @@ class Item(LoggedModel):
:type checkin_attention: bool
:param original_price: The item's "original" price. Will not be used for any calculations, will just be shown.
:type original_price: decimal.Decimal
:param require_approval: If set to ``True``, orders containing this product can only be processed and paid after approved by an administrator
:type require_approval: bool
"""
event = models.ForeignKey(
@@ -280,6 +282,13 @@ class Item(LoggedModel):
help_text=_('To buy this product, the user needs a voucher that applies to this product '
'either directly or via a quota.')
)
require_approval = models.BooleanField(
verbose_name=_('Buying this product requires approval.'),
default=False,
help_text=_('If this product is part of an order, the order will be put into an "approval" state and '
'will need to be confirmed by you before it can be paid and completed. You can use this e.g. for '
'discounted tickets that are only available to specific groups.'),
)
hide_without_voucher = models.BooleanField(
verbose_name=_('This product will only be shown if a voucher matching the product is redeemed.'),
default=False,