Refs #105 -- Variation support for vouchers

This commit is contained in:
Raphael Michel
2016-03-20 11:46:55 +01:00
parent 05aed0182e
commit 047e5bb067
6 changed files with 82 additions and 13 deletions

View File

@@ -5,7 +5,7 @@ from django.utils.translation import ugettext_lazy as _
from .base import LoggedModel
from .event import Event
from .items import Item
from .items import Item, ItemVariation
from .orders import CartPosition, OrderPosition
@@ -63,6 +63,14 @@ class Voucher(LoggedModel):
"This product is added to the user's cart if the voucher is redeemed."
)
)
variation = models.ForeignKey(
ItemVariation, related_name='vouchers',
null=True, blank=True,
verbose_name=_("Product variation"),
help_text=_(
"This variation of the product select above is being used."
)
)
class Meta:
verbose_name = _("Voucher")