mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] default value for old_reservations
This commit is contained in:
@@ -288,7 +288,7 @@ class HotelReservationImporter(Component):
|
|||||||
'state': 'confirm',
|
'state': 'confirm',
|
||||||
})
|
})
|
||||||
|
|
||||||
@api.model()
|
@api.model
|
||||||
def wubook_modification(self, reservations, book):
|
def wubook_modification(self, reservations, book):
|
||||||
channel_room_type_obj = self.env['channel.hotel.room.type']
|
channel_room_type_obj = self.env['channel.hotel.room.type']
|
||||||
checkin_utc_dt, checkout_utc_dt = self._get_book_dates(book)
|
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:
|
if book['was_modified'] and is_cancellation:
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
old_reservations = False
|
||||||
reservations = self.env['channel.hotel.reservation'].search([
|
reservations = self.env['channel.hotel.reservation'].search([
|
||||||
('external_id', 'in', book['modified_reservations']),
|
('external_id', 'in', book['modified_reservations']),
|
||||||
('backend_id', '=', self.backend_record.id)
|
('backend_id', '=', self.backend_record.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user