mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Channel OTA info using template inheritance
This commit is contained in:
@@ -75,6 +75,7 @@ class BusHotelCalendar(models.TransientModel):
|
|||||||
'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'],
|
||||||
|
'channel_type': vals['channel_type'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ class HotelReservation(models.Model):
|
|||||||
or _('No reason given'),
|
or _('No reason given'),
|
||||||
'splitted': reserv['splitted'],
|
'splitted': reserv['splitted'],
|
||||||
'reserv_chunks': reserv_chunks,
|
'reserv_chunks': reserv_chunks,
|
||||||
|
'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, ...
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -194,7 +195,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.out_service_description, hr.arrival_hour, hr.departure_hour, hr.channel_type, 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,
|
||||||
|
|
||||||
@@ -418,6 +419,7 @@ class HotelReservation(models.Model):
|
|||||||
'out_service_description': self.out_service_description
|
'out_service_description': self.out_service_description
|
||||||
or _('No reason given'),
|
or _('No reason given'),
|
||||||
'real_dates': [self.real_checkin, self.real_checkout],
|
'real_dates': [self.real_checkin, self.real_checkout],
|
||||||
|
'channel_type': self.channel_type,
|
||||||
}
|
}
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
|
|||||||
@@ -758,6 +758,7 @@ var PMSCalendarController = AbstractController.extend({
|
|||||||
'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'],
|
'reserv_chunks': tp['reserv_chunks'],
|
||||||
|
'channel_type': tp['channel_type'],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -84,14 +84,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
|
|
||||||
<t t-name="HotelCalendar.TooltipReservation.Channel.ota">
|
<t t-name="HotelCalendar.TooltipReservation.Channel.ota">
|
||||||
<p>WuBook: 1544109684</p>
|
<div id="channel_info"></div>
|
||||||
<p>Booking: 4253096846</p>
|
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
<t t-name="HotelCalendar.TooltipReservation.Channel.direct">
|
<t t-name="HotelCalendar.TooltipReservation.Channel.direct">
|
||||||
<h3 class="mt-10"><small class="text-white">Sales Channel</small> Direct</h3>
|
<div class="row row-eq-height">
|
||||||
|
<div class="col-sm-12 bg-gray-light">
|
||||||
|
Sales Channel: <b class="mt-10"><t t-esc="channel_type"/></b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row row-eq-height">
|
||||||
|
<div class="col-sm-12 bg-gray-light">
|
||||||
|
<t t-if="channel_type =='call'">
|
||||||
|
TODO: add call center information
|
||||||
|
</t>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
<t t-name="HotelCalendar.TooltipReservation.Footer">
|
<t t-name="HotelCalendar.TooltipReservation.Footer">
|
||||||
@@ -141,7 +150,7 @@
|
|||||||
<p>Total Paid</p>
|
<p>Total Paid</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 bg-gray-light">
|
<div class="col-sm-6 bg-gray-light">
|
||||||
<t t-if="channel_type == 'web' or channel_type =='call'">
|
<t t-if="channel_type == 'web'">
|
||||||
<t t-call="HotelCalendar.TooltipReservation.Channel.ota"/>
|
<t t-call="HotelCalendar.TooltipReservation.Channel.ota"/>
|
||||||
</t>
|
</t>
|
||||||
<t t-else="">
|
<t t-else="">
|
||||||
|
|||||||
@@ -5,9 +5,18 @@
|
|||||||
<t t-esc="message"/>
|
<t t-esc="message"/>
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
<t t-extend="HotelCalendar.TooltipReservation">
|
<t t-extend="HotelCalendar.TooltipReservation.Channel.ota">
|
||||||
<t t-jquery="ul.oe_tooltip_technical li:last-child" t-operation="after">
|
<t t-jquery="#channel_info" t-operation="replace">
|
||||||
<li t-if="ota_name"><b>OTA:</b> <t t-esc="ota_name"/></li>
|
<div class="row row-eq-height">
|
||||||
|
<div class="col-sm-12 bg-gray-light">
|
||||||
|
WuBook ID: 1544109684
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row row-eq-height">
|
||||||
|
<div class="col-sm-12 bg-gray-light">
|
||||||
|
<t t-esc="ota_name"/> ID: 4253096846
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user