From 4eb5a8608120d22432953c595e9fc690d66dde2c Mon Sep 17 00:00:00 2001 From: Pablo Date: Tue, 22 Jan 2019 20:20:52 +0100 Subject: [PATCH] [UPD] Out of service popover --- hotel_calendar/models/bus_hotel_calendar.py | 1 + .../models/inherited_hotel_reservation.py | 1 + .../calendar/hotel_calendar_controller.js | 1 + .../src/xml/hotel_calendar_templates.xml | 32 +++++++++++++++---- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/hotel_calendar/models/bus_hotel_calendar.py b/hotel_calendar/models/bus_hotel_calendar.py index 39de97fd0..6286b875a 100644 --- a/hotel_calendar/models/bus_hotel_calendar.py +++ b/hotel_calendar/models/bus_hotel_calendar.py @@ -67,6 +67,7 @@ class BusHotelCalendar(models.TransientModel): 'pending_amount': vals['pending_amount'], 'amount_paid': vals['amount_paid'], 'type': vals['reservation_type'], + 'closure_reason': vals['closure_reason'], 'out_service_description': vals['out_service_description'], 'splitted': vals['splitted'], 'real_dates': vals['real_dates'], diff --git a/hotel_calendar/models/inherited_hotel_reservation.py b/hotel_calendar/models/inherited_hotel_reservation.py index cfc94a7b8..156e5d6c8 100644 --- a/hotel_calendar/models/inherited_hotel_reservation.py +++ b/hotel_calendar/models/inherited_hotel_reservation.py @@ -113,6 +113,7 @@ class HotelReservation(models.Model): 'pending_amount': reserv['pending_amount'], 'amount_paid': reserv['amount_total'] - (reserv['pending_amount'] or 0.0), 'type': reserv['reservation_type'] or 'normal', + 'closure_reason': reserv['closure_reason'], 'out_service_description': reserv['out_service_description'] or _('No reason given'), 'splitted': reserv['splitted'], 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 80cf84cd8..438d620f3 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 @@ -756,6 +756,7 @@ var PMSCalendarController = AbstractController.extend({ 'pending_amount': Number(tp['pending_amount']).toLocaleString(), 'amount_paid': Number(tp['amount_paid']).toLocaleString(), 'reservation_type': tp['type'], + 'closure_reason': tp['closure_reason'], 'out_service_description': tp['out_service_description'], 'splitted': tp['splitted'], 'channel_type': tp['channel_type'], diff --git a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml index 8178b9c66..075a2e423 100644 --- a/hotel_calendar/static/src/xml/hotel_calendar_templates.xml +++ b/hotel_calendar/static/src/xml/hotel_calendar_templates.xml @@ -223,17 +223,37 @@
-
-
+
+
-

- +
+

+
+
+ +
+ +

+ +
+
+ +
+
+ +
+
+ +
+
+
-