Fix #91 -- Make products/orders that are not cancelable (#204)

* Make products/orders that are not cancellable
Update Unit Tests

* Make use of select_related instead of prefetch_related
Simplify cancellable logic
Migrations

* Simplify cancellable logic
Maske use of select_related instead of prefetch_related

* Fix cancelable condition bug
This commit is contained in:
Enrique Saez
2016-09-01 08:55:02 +02:00
committed by Raphael Michel
parent 022e02d913
commit 841cfe52a2
8 changed files with 114 additions and 1 deletions

View File

@@ -186,6 +186,11 @@ class Item(LoggedModel):
help_text=_('This product will be hidden from the event page until the user enters a voucher '
'code that is specifically tied to this product (and not via a quota).')
)
allow_cancel = models.BooleanField(
verbose_name=_('Allow product to be cancelled'),
default=True,
help_text=_('Whether this product might or not be cancelled.')
)
class Meta:
verbose_name = _("Product")