diff --git a/hotel_calendar/models/bus_hotel_calendar.py b/hotel_calendar/models/bus_hotel_calendar.py index 6286b875a..d9595a4dc 100644 --- a/hotel_calendar/models/bus_hotel_calendar.py +++ b/hotel_calendar/models/bus_hotel_calendar.py @@ -72,6 +72,7 @@ class BusHotelCalendar(models.TransientModel): 'splitted': vals['splitted'], 'real_dates': vals['real_dates'], 'channel_type': vals['channel_type'], + 'board_service_name': vals['board_service_name'], } } diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index 156e5d6c8..7e653cbc3 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -120,6 +120,7 @@ class HotelReservation(models.Model): 'channel_type': reserv['channel_type'], 'real_dates': [reserv['real_checkin'], reserv['real_checkout']], # TODO: Add Board Services and Extra Service as Cradle, Bed, ... + 'board_service_name': reserv['board_service_name'], } }) @@ -195,7 +196,9 @@ class HotelReservation(models.Model): pt.name as room_type, - rcr.name as closure_reason + rcr.name as closure_reason, + + hbs.name as board_service_name FROM hotel_reservation AS hr LEFT JOIN hotel_folio AS hf ON hr.folio_id = hf.id LEFT JOIN hotel_room_type AS hrt ON hr.room_type_id = hrt.id @@ -204,6 +207,8 @@ class HotelReservation(models.Model): LEFT JOIN res_partner AS rp ON hf.partner_id = rp.id LEFT JOIN room_closure_reason as rcr ON hf.closure_reason_id = rcr.id + LEFT JOIN hotel_board_service_room_type_rel AS hbsrt ON hr.board_service_room_id = hbsrt.id + LEFT JOIN hotel_board_service AS hbs ON hbsrt.hotel_board_service_id = hbs.id WHERE room_id IN %s AND ( (checkin <= %s AND checkout >= %s AND checkout <= %s) OR (checkin >= %s AND checkout <= %s) @@ -412,6 +417,7 @@ class HotelReservation(models.Model): or _('No reason given'), 'real_dates': [self.real_checkin, self.real_checkout], 'channel_type': self.channel_type, + 'board_service_name': self.board_service_room_id.hotel_board_service_id.name, } @api.multi diff --git a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js index 438d620f3..74f9e551b 100644 --- a/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js +++ b/hotel_calendar/static/src/js/views/calendar/hotel_calendar_controller.js @@ -760,6 +760,7 @@ var PMSCalendarController = AbstractController.extend({ 'out_service_description': tp['out_service_description'], 'splitted': tp['splitted'], 'channel_type': tp['channel_type'], + 'board_service_name': tp['board_service_name'], }; }, diff --git a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml index 075a2e423..0aec1b994 100644 --- a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml +++ b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml @@ -189,7 +189,7 @@
Board Service Undefined
+Board Service:
Adults:
Board Service:
Adults: