diff --git a/hotel_calendar/models/bus_hotel_calendar.py b/hotel_calendar/models/bus_hotel_calendar.py index d1016ae29..f46b13598 100644 --- a/hotel_calendar/models/bus_hotel_calendar.py +++ b/hotel_calendar/models/bus_hotel_calendar.py @@ -52,6 +52,7 @@ class BusHotelCalendar(models.TransientModel): 'price_room_services_set': vals['price_room_services_set'], 'amount_total': vals['pending_amount'] + vals['invoices_paid'], 'real_dates': vals['real_dates'], + 'channel_type': vals['channel_type'], }, 'tooltip': { 'folio_name': vals['folio_name'], diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index 262a6f6c2..b99f2963d 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -94,7 +94,9 @@ class HotelReservation(models.Model): 'state': reserv['state'], 'price_room_services_set': reserv['price_room_services_set'], 'amount_total': reserv['amount_total'], - 'real_dates': [reserv['real_checkin'], reserv['real_checkout']]}) + 'real_dates': [reserv['real_checkin'], reserv['real_checkout']], + 'channel_type': reserv['channel_type'], + }) json_reservation_tooltips.update({ reserv['id']: { 'folio_name': reserv['folio_name'], diff --git a/hotel_calendar_channel_connector/static/src/js/views/hotel_calendar_controller.js b/hotel_calendar_channel_connector/static/src/js/views/hotel_calendar_controller.js index 996d133d2..266291905 100644 --- a/hotel_calendar_channel_connector/static/src/js/views/hotel_calendar_controller.js +++ b/hotel_calendar_channel_connector/static/src/js/views/hotel_calendar_controller.js @@ -76,7 +76,7 @@ var PMSHotelCalendarController = PMSCalendarController.include({ } else if (notif[1]['type'] === 'reservation') { var reserv = notif[1]['reservation']; - if (reserv['external_id']) { + if (reserv['channel_type'] == 'web') { if (notif[1]['action'] === 'create') { this._play_sound(this.SOUNDS.BOOK_NEW); } else if (notif[1]['action'] !== 'unlink' && reserv['state'] === 'cancelled') {