From b4379a8e5c280576d278972a0295d4db17a67d92 Mon Sep 17 00:00:00 2001 From: Josep Prades Vidal Date: Thu, 13 Jun 2024 18:08:12 +0200 Subject: [PATCH] Update views.py --- Restaurant/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Restaurant/views.py b/Restaurant/views.py index 77d26f4..3eba8c0 100644 --- a/Restaurant/views.py +++ b/Restaurant/views.py @@ -196,6 +196,7 @@ def generate_order_pdf(request): response['Content-Disposition'] = 'attachment; filename="factura.pdf"' return response + def create_order_pdf_bytes(reservation): items_amounts = [] if reservation.order_num: @@ -273,6 +274,7 @@ def create_order_pdf_bytes(reservation): c.save() return buffer + def view_orders_without_reservation(request): if request.user.has_perm('waiter'): orders_with_reservation = RestaurantReservation.objects.exclude(order_num_id=None).values_list('order_num_id',