mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] Use real_dates for showing correct checkin/checkout in splitted reservation
This commit is contained in:
@@ -68,6 +68,7 @@ class BusHotelCalendar(models.TransientModel):
|
||||
'type': vals['reservation_type'],
|
||||
'out_service_description': vals['out_service_description'],
|
||||
'splitted': vals['splitted'],
|
||||
'real_dates': vals['real_dates'],
|
||||
'channel_type': vals['channel_type'],
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,7 @@ class HotelReservation(models.Model):
|
||||
or _('No reason given'),
|
||||
'splitted': reserv['splitted'],
|
||||
'channel_type': reserv['channel_type'],
|
||||
'real_dates': [reserv['real_checkin'], reserv['real_checkout']],
|
||||
# TODO: Add Board Services and Extra Service as Cradle, Bed, ...
|
||||
}
|
||||
})
|
||||
|
||||
@@ -746,10 +746,10 @@ var PMSCalendarController = AbstractController.extend({
|
||||
'room_type_name': tp['room_type_name'],
|
||||
'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"),
|
||||
'checkin': HotelCalendar.toMomentUTC(tp['real_dates'][0], '').format("DD MMMM"),
|
||||
'checkin_day_of_week': HotelCalendar.toMomentUTC(tp['real_dates'][0], '').format("dddd"),
|
||||
'checkout': HotelCalendar.toMomentUTC(tp['real_dates'][1], '').format("DD MMMM"),
|
||||
'checkout_day_of_week': HotelCalendar.toMomentUTC(tp['real_dates'][1], '').format("dddd"),
|
||||
'arrival_hour': tp['arrival_hour'],
|
||||
'departure_hour': tp['departure_hour'],
|
||||
'amount_total': Number(tp['amount_total']).toLocaleString(),
|
||||
|
||||
Reference in New Issue
Block a user