From 99b1b10f7c51722228ec346abc1c2e480746e38b Mon Sep 17 00:00:00 2001 From: Jose Luis Date: Thu, 11 Jul 2019 19:31:02 +0200 Subject: [PATCH] [FIX] Canceled reservation in DataBi --- hotel_data_bi/models/data_bi.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hotel_data_bi/models/data_bi.py b/hotel_data_bi/models/data_bi.py index 912cf0f8c..2d8195d0f 100644 --- a/hotel_data_bi/models/data_bi.py +++ b/hotel_data_bi/models/data_bi.py @@ -378,8 +378,11 @@ class Data_Bi(models.Model): def data_bi_reservas(self, compan, lines, estado_array, dic_clientes): dic_reservas = [] lineas = lines.filtered( - lambda n: (n.reservation_id.reservation_type == 'normal') and ( - n.price > 0)) + lambda n: + (n.reservation_id.reservation_type == 'normal') and + (n.price > 0) and + (n.reservation_id.state != 'cancelled') + ) _logger.info("DataBi: Calculating %s reservations", str(len(lineas))) channels = {'door': 0, 'mail': 1,