mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[DEL] Deleted Split information in popover
At the moment it is better to prioritize performance.
This commit is contained in:
@@ -23,13 +23,6 @@ class BusHotelCalendar(models.TransientModel):
|
|||||||
@api.model
|
@api.model
|
||||||
def _generate_reservation_notif(self, vals):
|
def _generate_reservation_notif(self, vals):
|
||||||
user_id = self.env['res.users'].browse(self.env.uid)
|
user_id = self.env['res.users'].browse(self.env.uid)
|
||||||
master_reserv = vals['parent_reservation'] or vals['reserv_id']
|
|
||||||
reserv_chunks = self.env['hotel.reservation'].search_count([
|
|
||||||
('folio_id', '=', vals['folio_id']),
|
|
||||||
'|', ('parent_reservation', '=', master_reserv),
|
|
||||||
('id', '=', master_reserv),
|
|
||||||
('splitted', '=', True),
|
|
||||||
])
|
|
||||||
return {
|
return {
|
||||||
'type': 'reservation',
|
'type': 'reservation',
|
||||||
'action': vals['action'],
|
'action': vals['action'],
|
||||||
@@ -69,12 +62,12 @@ class BusHotelCalendar(models.TransientModel):
|
|||||||
'checkout': vals['checkout'],
|
'checkout': vals['checkout'],
|
||||||
'arrival_hour': vals['arrival_hour'],
|
'arrival_hour': vals['arrival_hour'],
|
||||||
'departure_hour': vals['departure_hour'],
|
'departure_hour': vals['departure_hour'],
|
||||||
'reserv_chunks': reserv_chunks,
|
|
||||||
'amount_total': vals['amount_total'],
|
'amount_total': vals['amount_total'],
|
||||||
'pending_amount': vals['pending_amount'],
|
'pending_amount': vals['pending_amount'],
|
||||||
'amount_paid': vals['amount_paid'],
|
'amount_paid': vals['amount_paid'],
|
||||||
'type': vals['reservation_type'],
|
'type': vals['reservation_type'],
|
||||||
'out_service_description': vals['out_service_description'],
|
'out_service_description': vals['out_service_description'],
|
||||||
|
'splitted': vals['splitted'],
|
||||||
'channel_type': vals['channel_type'],
|
'channel_type': vals['channel_type'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,15 +93,6 @@ class HotelReservation(models.Model):
|
|||||||
'overbooking': reserv['overbooking'],
|
'overbooking': reserv['overbooking'],
|
||||||
'state': reserv['state'],
|
'state': reserv['state'],
|
||||||
'real_dates': [reserv['real_checkin'], reserv['real_checkout']]})
|
'real_dates': [reserv['real_checkin'], reserv['real_checkout']]})
|
||||||
reserv_chunks = 1
|
|
||||||
if reserv['splitted']:
|
|
||||||
master_reserv = reserv['parent_reservation'] or reserv['folio_id']
|
|
||||||
reserv_chunks = self.search_count([
|
|
||||||
('folio_id', '=', reserv['folio_id']),
|
|
||||||
'|', ('parent_reservation', '=', master_reserv),
|
|
||||||
('id', '=', master_reserv),
|
|
||||||
('splitted', '=', True),
|
|
||||||
])
|
|
||||||
json_reservation_tooltips.update({
|
json_reservation_tooltips.update({
|
||||||
reserv['id']: {
|
reserv['id']: {
|
||||||
'folio_name': reserv['folio_id'],
|
'folio_name': reserv['folio_id'],
|
||||||
@@ -125,7 +116,6 @@ class HotelReservation(models.Model):
|
|||||||
'out_service_description': reserv['out_service_description']
|
'out_service_description': reserv['out_service_description']
|
||||||
or _('No reason given'),
|
or _('No reason given'),
|
||||||
'splitted': reserv['splitted'],
|
'splitted': reserv['splitted'],
|
||||||
'reserv_chunks': reserv_chunks,
|
|
||||||
'channel_type': reserv['channel_type'],
|
'channel_type': reserv['channel_type'],
|
||||||
# TODO: Add Board Services and Extra Service as Cradle, Bed, ...
|
# TODO: Add Board Services and Extra Service as Cradle, Bed, ...
|
||||||
}
|
}
|
||||||
@@ -195,7 +185,7 @@ class HotelReservation(models.Model):
|
|||||||
SELECT
|
SELECT
|
||||||
hr.id, hr.room_id, hr.adults, hr.children, hr.checkin, hr.checkout, hr.reserve_color, hr.reserve_color_text,
|
hr.id, hr.room_id, hr.adults, hr.children, hr.checkin, hr.checkout, hr.reserve_color, hr.reserve_color_text,
|
||||||
hr.splitted, hr.parent_reservation, hr.overbooking, hr.state, hr.real_checkin, hr.real_checkout,
|
hr.splitted, hr.parent_reservation, hr.overbooking, hr.state, hr.real_checkin, hr.real_checkout,
|
||||||
hr.out_service_description, hr.arrival_hour, hr.departure_hour, hr.channel_type, hr.channel_type,
|
hr.out_service_description, hr.arrival_hour, hr.departure_hour, hr.channel_type,
|
||||||
|
|
||||||
hf.id as folio_id, hf.name as folio_name, hf.reservation_type, hf.amount_total, hf.pending_amount,
|
hf.id as folio_id, hf.name as folio_name, hf.reservation_type, hf.amount_total, hf.pending_amount,
|
||||||
|
|
||||||
|
|||||||
@@ -757,7 +757,7 @@ var PMSCalendarController = AbstractController.extend({
|
|||||||
'amount_paid': Number(tp['amount_paid']).toLocaleString(),
|
'amount_paid': Number(tp['amount_paid']).toLocaleString(),
|
||||||
'reservation_type': tp['type'],
|
'reservation_type': tp['type'],
|
||||||
'out_service_description': tp['out_service_description'],
|
'out_service_description': tp['out_service_description'],
|
||||||
'reserv_chunks': tp['reserv_chunks'],
|
'splitted': tp['splitted'],
|
||||||
'channel_type': tp['channel_type'],
|
'channel_type': tp['channel_type'],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -131,8 +131,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row row-eq-height mt-10">
|
<div class="row row-eq-height mt-10">
|
||||||
<t t-if="reserv_chunks > 1">
|
<t t-if="splitted">
|
||||||
This reservation has been splitted in <t t-esc="reserv_chunks"/> chunks.
|
This reservation is part of splitted reservation. You can check it in the corresponding Folio.
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
<t t-jquery="#channel_info" t-operation="replace">
|
<t t-jquery="#channel_info" t-operation="replace">
|
||||||
<div class="row row-eq-height">
|
<div class="row row-eq-height">
|
||||||
<div class="col-sm-12 bg-gray-light">
|
<div class="col-sm-12 bg-gray-light">
|
||||||
WuBook ID: 1544109684
|
WuBook: 1544109684
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row row-eq-height">
|
<div class="row row-eq-height">
|
||||||
<div class="col-sm-12 bg-gray-light">
|
<div class="col-sm-12 bg-gray-light">
|
||||||
<t t-esc="ota_name"/> ID: 4253096846
|
<t t-esc="ota_name"/>: 4253096846
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
|||||||
Reference in New Issue
Block a user