diff --git a/src/backoffice/templates/badge_handout.html b/src/backoffice/templates/badge_handout.html
index 722f9795..c92ed64b 100644
--- a/src/backoffice/templates/badge_handout.html
+++ b/src/backoffice/templates/badge_handout.html
@@ -13,7 +13,7 @@
Use this view to hand out badges to participants. Use the search field to search for username, email, products, order ID, ticket UUID, etc. To check in participants go to the Ticket Checkin view instead. To hand out merchandise and other products go to the Hand Out Products view instead.
- This table shows all (Shop|Discount|Sponsor)Tickets which are badge_handed_out=False. Tickets must be checked in before they are shown in this list.
+ This table shows all (Shop|Discount|Sponsor)Tickets which are badge_ticket_generated=False. Tickets must be checked in before they are shown in this list.
diff --git a/src/backoffice/templates/product_handout.html b/src/backoffice/templates/product_handout.html
index 677ff974..a8db0054 100644
--- a/src/backoffice/templates/product_handout.html
+++ b/src/backoffice/templates/product_handout.html
@@ -13,7 +13,7 @@
Use this view to hand out products to participants. Use the search field to search for username, email, products, order ID etc. To check in participants go to the Ticket Checkin view instead. To hand out badges go to the Badge Handout view instead.
- This table shows all OrderProductRelations which are handed_out=False (not including unpaid, cancelled and refunded orders). The table is initally sorted by order ID but the sorting can be changed by clicking the column headlines (if javascript is enabled).
+ This table shows all OrderProductRelations which are ticket_generated=False (not including unpaid, cancelled and refunded orders). The table is initally sorted by order ID but the sorting can be changed by clicking the column headlines (if javascript is enabled).
diff --git a/src/backoffice/views.py b/src/backoffice/views.py
index e66c98d6..08a4a4cd 100644
--- a/src/backoffice/views.py
+++ b/src/backoffice/views.py
@@ -41,7 +41,7 @@ class ProductHandoutView(CampViewMixin, InfoTeamPermissionMixin, ListView):
def get_queryset(self, **kwargs):
return OrderProductRelation.objects.filter(
- handed_out=False,
+ ticket_generated=False,
order__paid=True,
order__refunded=False,
order__cancelled=False,
@@ -53,9 +53,9 @@ class BadgeHandoutView(CampViewMixin, InfoTeamPermissionMixin, ListView):
context_object_name = "tickets"
def get_queryset(self, **kwargs):
- shoptickets = ShopTicket.objects.filter(badge_handed_out=False)
- sponsortickets = SponsorTicket.objects.filter(badge_handed_out=False)
- discounttickets = DiscountTicket.objects.filter(badge_handed_out=False)
+ shoptickets = ShopTicket.objects.filter(badge_ticket_generated=False)
+ sponsortickets = SponsorTicket.objects.filter(badge_ticket_generated=False)
+ discounttickets = DiscountTicket.objects.filter(badge_ticket_generated=False)
return list(chain(shoptickets, sponsortickets, discounttickets))
@@ -152,7 +152,7 @@ class MerchandiseOrdersView(CampViewMixin, OrgaTeamPermissionMixin, ListView):
return (
OrderProductRelation.objects.filter(
- handed_out=False,
+ ticket_generated=False,
order__paid=True,
order__refunded=False,
order__cancelled=False,
@@ -170,7 +170,7 @@ class MerchandiseToOrderView(CampViewMixin, OrgaTeamPermissionMixin, TemplateVie
camp_prefix = "BornHack {}".format(timezone.now().year)
order_relations = OrderProductRelation.objects.filter(
- handed_out=False,
+ ticket_generated=False,
order__paid=True,
order__refunded=False,
order__cancelled=False,
@@ -198,7 +198,7 @@ class VillageOrdersView(CampViewMixin, OrgaTeamPermissionMixin, ListView):
return (
OrderProductRelation.objects.filter(
- handed_out=False,
+ ticket_generated=False,
order__paid=True,
order__refunded=False,
order__cancelled=False,
@@ -216,7 +216,7 @@ class VillageToOrderView(CampViewMixin, OrgaTeamPermissionMixin, TemplateView):
camp_prefix = "BornHack {}".format(timezone.now().year)
order_relations = OrderProductRelation.objects.filter(
- handed_out=False,
+ ticket_generated=False,
order__paid=True,
order__refunded=False,
order__cancelled=False,
diff --git a/src/shop/factories.py b/src/shop/factories.py
index 3c65c43f..6bc42936 100644
--- a/src/shop/factories.py
+++ b/src/shop/factories.py
@@ -46,4 +46,4 @@ class OrderProductRelationFactory(DjangoModelFactory):
product = factory.SubFactory(ProductFactory)
order = factory.SubFactory(OrderFactory)
quantity = 1
- handed_out = False
+ ticket_generated = False
diff --git a/src/shop/models.py b/src/shop/models.py
index 36fd3d2d..07091cf4 100644
--- a/src/shop/models.py
+++ b/src/shop/models.py
@@ -289,35 +289,35 @@ class Order(CreatedUpdatedModel):
self.open = None
self.save()
- def is_not_handed_out(self):
- if self.orderproductrelation_set.filter(handed_out=True).count() == 0:
+ def is_not_ticket_generated(self):
+ if self.orderproductrelation_set.filter(tic=True).count() == 0:
return True
else:
return False
- def is_partially_handed_out(self):
+ def is_partially_ticket_generated(self):
if (
- self.orderproductrelation_set.filter(handed_out=True).count() != 0
- and self.orderproductrelation_set.filter(handed_out=False).count() != 0
+ self.orderproductrelation_set.filter(ticket_generated=True).count() != 0
+ and self.orderproductrelation_set.filter(ticket_generated=False).count() != 0
):
# some products are handed out, others are not
return True
else:
return False
- def is_fully_handed_out(self):
- if self.orderproductrelation_set.filter(handed_out=False).count() == 0:
+ def is_fully_ticket_generated(self):
+ if self.orderproductrelation_set.filter(ticket_generated=False).count() == 0:
return True
else:
return False
@property
- def handed_out_status(self):
- if self.is_not_handed_out():
+ def ticket_generated_status(self):
+ if self.is_not_ticket_generated():
return "no"
- elif self.is_partially_handed_out():
+ elif self.is_partially_ticket_generated():
return "partially"
- elif self.is_fully_handed_out():
+ elif self.is_fully_ticket_generated():
return "fully"
else:
return False
@@ -473,7 +473,7 @@ class OrderProductRelation(CreatedUpdatedModel):
return Decimal(self.product.price * self.quantity)
def clean(self):
- if self.handed_out and not self.order.paid:
+ if self.ticket_generated and not self.order.paid:
raise ValidationError(
"Product can not be handed out when order is not paid."
)
diff --git a/src/shop/templates/order_list.html b/src/shop/templates/order_list.html
index 54802925..1c0f5507 100644
--- a/src/shop/templates/order_list.html
+++ b/src/shop/templates/order_list.html
@@ -25,13 +25,13 @@
{% for order in orders %}
{% if order.products.exists %}
-
+
{{ order.id }} |
{{ order.get_number_of_items }} |
{{ order.total|currency }} |
{{ order.open|truefalseicon }} |
{{ order.paid|truefalseicon }} |
- {{ order.handed_out_status }} |
+ {{ order.ticket_generated_status }} |
{% if order.paid %}
{% if order.invoice.pdf %}
|