mark orders as paid in bootstrap script (#189)
they are marked as payed such that tickets are generated so we can design the backoffice$
This commit is contained in:
parent
8595377066
commit
93a827bf7e
|
@ -199,7 +199,8 @@ class Order(CreatedUpdatedModel):
|
||||||
product=order_product.product,
|
product=order_product.product,
|
||||||
)
|
)
|
||||||
ticket.save()
|
ticket.save()
|
||||||
messages.success(request, "Created %s tickets of type: %s" % (order_product.quantity, order_product.product.ticket_type.name))
|
if request:
|
||||||
|
messages.success(request, "Created %s tickets of type: %s" % (order_product.quantity, order_product.product.ticket_type.name))
|
||||||
# and mark the OPR as handed_out=True
|
# and mark the OPR as handed_out=True
|
||||||
order_product.handed_out=True
|
order_product.handed_out=True
|
||||||
order_product.save()
|
order_product.save()
|
||||||
|
|
|
@ -364,6 +364,7 @@ class Command(BaseCommand):
|
||||||
product=tent1,
|
product=tent1,
|
||||||
quantity=1,
|
quantity=1,
|
||||||
)
|
)
|
||||||
|
order0.mark_as_paid(request=None)
|
||||||
|
|
||||||
order1 = Order.objects.create(
|
order1 = Order.objects.create(
|
||||||
user=user2,
|
user=user2,
|
||||||
|
@ -378,6 +379,8 @@ class Command(BaseCommand):
|
||||||
product=tent2,
|
product=tent2,
|
||||||
quantity=1,
|
quantity=1,
|
||||||
)
|
)
|
||||||
|
order1.mark_as_paid(request=None)
|
||||||
|
|
||||||
order2 = Order.objects.create(
|
order2 = Order.objects.create(
|
||||||
user=user3,
|
user=user3,
|
||||||
payment_method='cash',
|
payment_method='cash',
|
||||||
|
@ -395,6 +398,8 @@ class Command(BaseCommand):
|
||||||
product=tent2,
|
product=tent2,
|
||||||
quantity=1,
|
quantity=1,
|
||||||
)
|
)
|
||||||
|
order2.mark_as_paid(request=None)
|
||||||
|
|
||||||
order3 = Order.objects.create(
|
order3 = Order.objects.create(
|
||||||
user=user4,
|
user=user4,
|
||||||
payment_method='cash',
|
payment_method='cash',
|
||||||
|
@ -412,6 +417,7 @@ class Command(BaseCommand):
|
||||||
product=tent1,
|
product=tent1,
|
||||||
quantity=1,
|
quantity=1,
|
||||||
)
|
)
|
||||||
|
order3.mark_as_paid(request=None)
|
||||||
|
|
||||||
self.output('Creating eventlocations for {}...'.format(year))
|
self.output('Creating eventlocations for {}...'.format(year))
|
||||||
speakers_tent = EventLocation.objects.create(
|
speakers_tent = EventLocation.objects.create(
|
||||||
|
|
Loading…
Reference in a new issue