diff --git a/hotel_calendar/models/bus_hotel_calendar.py b/hotel_calendar/models/bus_hotel_calendar.py index 55d9f9f6b..5ae1ac6a6 100644 --- a/hotel_calendar/models/bus_hotel_calendar.py +++ b/hotel_calendar/models/bus_hotel_calendar.py @@ -61,11 +61,20 @@ class BusHotelCalendar(models.TransientModel): 'tooltip': { 'name': vals['partner_name'], 'phone': vals['partner_phone'], + 'email': vals['partner_email'], + 'room_type_name': vals['room_type_name'], + 'adults': vals['adults'], + 'children': vals['children'], 'checkin': vals['checkin'], + 'checkout': vals['checkout'], + 'arrival_hour': vals['arrival_hour'], + 'departure_hour': vals['departure_hour'], 'num_split': num_split, 'amount_total': vals['amount_total'], - 'type': vals['reservation_type'] if 'reservation_type' in vals else 'normal', - 'out_service_description': vals['out_service_description'] if 'out_service_description' in vals else _('No reason given'), + 'pending_amount': vals['pending_amount'], + 'amount_paid': vals['amount_paid'], + 'type': vals['reservation_type'], + 'out_service_description': vals['out_service_description'], } } diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index 5d72cb3a9..c68c109fb 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -113,7 +113,7 @@ class HotelReservation(models.Model): 'name': _('Out of service') if reserv.folio_id.reservation_type == 'out' else reserv.folio_id.partner_id.name, 'phone': reserv.mobile or reserv.phone or _('Phone not provided'), 'email': reserv.email or _('Email not provided'), - 'room_type': reserv.room_type_id.name, + 'room_type_name': reserv.room_type_id.name, 'adults': reserv.adults, 'children': reserv.children, 'checkin': reserv.checkin, @@ -127,6 +127,7 @@ class HotelReservation(models.Model): 'type': reserv.reservation_type or 'normal', 'out_service_description': reserv.out_service_description or _('No reason given'), + # TODO: Add Board Services and Extra Service as Cradle, Bed, ... } }) return (json_reservations, json_reservation_tooltips) @@ -363,6 +364,8 @@ class HotelReservation(models.Model): 'children': self.children, 'checkin': self.checkin, 'checkout': self.checkout, + 'arrival_hour': self.arrival_hour, + 'departure_hour': self.departure_hour, 'folio_id': self.folio_id.id, 'reserve_color': self.reserve_color, 'reserve_color_text': self.reserve_color_text, @@ -370,12 +373,16 @@ class HotelReservation(models.Model): 'parent_reservation': self.parent_reservation and self.parent_reservation.id or 0, 'room_name': self.room_id.name, + 'room_type_name': self.room_type_id.name, 'partner_phone': self.partner_id.mobile or self.partner_id.phone or _('Undefined'), + 'partner_email': self.partner_id.email or _('Undefined'), 'state': self.state, 'fix_days': self.splitted, 'overbooking': self.overbooking, 'amount_total': self.folio_id.amount_total, + 'pending_amount': self.folio_id.pending_amount, + 'amount_paid': self.folio_id.amount_total - self.folio_id.pending_amount, 'reservation_type': self.reservation_type or 'normal', 'closure_reason_id': self.closure_reason_id, 'out_service_description': self.out_service_description or _('No reason given'), 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 b6d7564ab..5e4fc02b1 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 @@ -682,12 +682,13 @@ var PMSCalendarController = AbstractController.extend({ }, _generate_reservation_tooltip_dict: function(tp) { + console.log(tp); return { 'folio_name': tp['folio_name'], 'name': tp['name'], 'phone': tp['phone'], 'email': tp['email'], - 'room_type': tp['room_type'], + 'room_type_name': tp['room_type_name'], 'adults': tp['adults'], 'children': tp['children'], 'checkin': HotelCalendar.toMomentUTC(tp['checkin'], '').format("DD MMMM"), diff --git a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml index c69e3dfb7..b8c2b75d3 100644 --- a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml +++ b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml @@ -174,7 +174,7 @@
Board Service Undefined
Adults:
Adults: