diff --git a/hotel_calendar/models/bus_hotel_calendar.py b/hotel_calendar/models/bus_hotel_calendar.py index 36a95166f..b80d92fbd 100644 --- a/hotel_calendar/models/bus_hotel_calendar.py +++ b/hotel_calendar/models/bus_hotel_calendar.py @@ -30,7 +30,7 @@ class BusHotelCalendar(models.TransientModel): ('id', '=', master_reserv), ('splitted', '=', True), ]) - + import wdb; wdb.set_trace() return { 'type': 'reservation', 'action': vals['action'], diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index 7c0bdb194..26552b45c 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -109,12 +109,21 @@ class HotelReservation(models.Model): ]) json_reservation_tooltips.update({ reserv.id: { + 'folio_name': reserv.folio_id.name, 'name': _('Out of service') if reserv.folio_id.reservation_type == 'out' else reserv.folio_id.partner_id.name, - 'phone': reserv.folio_id.partner_id.mobile or - reserv.folio_id.partner_id.phone or _('Undefined'), + 'phone': reserv.mobile or reserv.phone or _('Phone not provided'), + 'email': reserv.email or _('Email not provided'), + 'room_type': reserv.room_type_id.name, + 'adults': reserv.adults, + 'childrens': reserv.children, 'checkin': reserv.checkin, + 'checkout': reserv.checkout, + 'arrival_hour': reserv.arrival_hour, + 'departure_hour': reserv.departure_hour, 'num_split': num_split, 'amount_total': reserv.folio_id.amount_total, + 'pending_amount': reserv.folio_id.pending_amount, + 'amount_paid': reserv.folio_id.amount_total - reserv.folio_id.pending_amount, 'type': reserv.reservation_type or 'normal', 'out_service_description': reserv.out_service_description or _('No reason given'), @@ -342,6 +351,7 @@ class HotelReservation(models.Model): @api.multi def generate_bus_values(self, naction, ntype, ntitle=''): self.ensure_one() + import wdb; wdb.set_trace() return { 'action': naction, 'type': ntype, diff --git a/hotel_calendar/static/src/css/view.css b/hotel_calendar/static/src/css/view.css index 53a020a67..5b2e026c7 100644 --- a/hotel_calendar/static/src/css/view.css +++ b/hotel_calendar/static/src/css/view.css @@ -158,3 +158,21 @@ input#bookings_search { line-height: 1.2; text-align: left; } + +/** TOOLTIPS **/ +.tooltip { + +} +.tooltip .tooltip-inner { + border: 1px solid #5C5C5C; + background-color: white; + color: #5C5C5C; +} + +.tooltip .container { + max-width: 500px; +} + +.tooltip .list-group-item { + border: none; +} \ No newline at end of file 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 97478fb5c..45214dc8d 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 @@ -367,6 +367,7 @@ var PMSCalendarController = AbstractController.extend({ var tp = self._multi_calendar._reserv_tooltips[ev.detail.reservationObj.id]; var qdict = self._generate_reservation_tooltip_dict(tp); $(ev.detail.reservationDiv).tooltip('destroy').tooltip({ + trigger: 'manual', animation: false, html: true, placement: 'bottom', @@ -634,11 +635,23 @@ var PMSCalendarController = AbstractController.extend({ _generate_reservation_tooltip_dict: function(tp) { return { + 'folio_name': tp['folio_name'], 'name': tp['name'], 'phone': tp['phone'], - 'arrival_hour': HotelCalendar.toMomentUTC(tp['checkin'], HotelConstants.ODOO_DATETIME_MOMENT_FORMAT).local().format('HH:mm'), + 'email': tp['email'], + 'room_type': tp['room_type'], + 'adults': tp['adults'], + 'children': tp['children'], + 'checkin': HotelCalendar.toMomentUTC(tp['checkin'], '').format("DD MMMM"), + 'checkin_day_of_week': HotelCalendar.toMomentUTC(tp['checkin'], '').format("dddd"), + 'checkout': HotelCalendar.toMomentUTC(tp['checkout'], '').format("DD MMMM"), + 'checkout_day_of_week': HotelCalendar.toMomentUTC(tp['checkout'], '').format("dddd"), + 'arrival_hour': tp['arrival_hour'], + 'departure_hour': tp['departure_hour'], 'num_split': tp['num_split'], 'amount_total': Number(tp['amount_total']).toLocaleString(), + 'pending_amount': Number(tp['pending_amount']).toLocaleString(), + 'amount_paid': Number(tp['amount_paid']).toLocaleString(), 'reservation_type': tp['type'], 'out_service_description': tp['out_service_description'] }; diff --git a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml index ba0d55bee..8f103cce4 100644 --- a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml +++ b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml @@ -69,23 +69,85 @@ - - - - Phone: - Arrival Hour: - - Splitted: - - - Total Amount: € - - - - - Reason: - - + + + + + + + + + + + + + + + + + Board Service Undefined + Adults: + Children: + + + + € + + + + + + + + + Por Pagar € + Pagado € + + + WuBook: 1544109684 + Booking: 4253096846 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +