From cb0b72c68fa8889c2dd1b5872f1caa34fa0515ef Mon Sep 17 00:00:00 2001 From: Pablo Date: Wed, 5 Jun 2019 12:53:23 +0200 Subject: [PATCH] [FIX] default value for old_reservations --- .../models/hotel_reservation/importer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py index 5f3afc386..9a11888a2 100644 --- a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py +++ b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py @@ -288,7 +288,7 @@ class HotelReservationImporter(Component): 'state': 'confirm', }) - @api.model() + @api.model def wubook_modification(self, reservations, book): channel_room_type_obj = self.env['channel.hotel.room.type'] checkin_utc_dt, checkout_utc_dt = self._get_book_dates(book) @@ -394,6 +394,7 @@ class HotelReservationImporter(Component): if book['was_modified'] and is_cancellation: continue else: + old_reservations = False reservations = self.env['channel.hotel.reservation'].search([ ('external_id', 'in', book['modified_reservations']), ('backend_id', '=', self.backend_record.id)