From 8e8dca39525595f8c7dea852833a9b853b4bc3c4 Mon Sep 17 00:00:00 2001 From: Dario Lodeiros Date: Sat, 25 May 2019 10:00:18 +0200 Subject: [PATCH] [FIX] Import reservation with unknown wubook rate --- .../models/hotel_reservation/importer.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py index 178b41d2d..6bc1975a2 100644 --- a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py +++ b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py @@ -145,6 +145,13 @@ class HotelReservationImporter(Component): tprice += room_day_price rate_id = brday['rate_id'] # TODO: Review different pricelist in the different booked rooms (folio in Odoo) + if rate_id < 0: + rate_id = 0 + self.create_issue( + section='reservation', + internal_emssage="Reservation imported with unknown \ + pricelist (established by default)", + channel_object_id=book['reservation_code']) if rate_id == 0: default_rate_id = self.env['channel.backend'].search([ ('id', '=', self.backend_record.id)