[FIX] website_event: display ticket description correctly
Steps to reproduce: - create an event with a single ticket that has a description Bug: The default quantity on the website is set to 0 where it should be 1 Cause: On this commit[1] adding description to a single ticket was done by applying the multiple tickets layout but this also sets qty to 0 Fix: removed the condition and added the description to the single ticket opw-3018139 [1]:https://github.com/odoo/odoo/commit/9c4c953d004acaf916df348b670182b48b85d165 closes odoo/odoo#105819 X-original-commit: e9ab599113125bd55fdfd2e3d95f71f52e001660 Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
This commit is contained in:
@@ -150,7 +150,7 @@
|
||||
<div id="o_wevent_tickets" class="o_wevent_theme_bg_base shadow-sm o_wevent_js_ticket_details" data-folded-by-default="0">
|
||||
<t t-set="tickets" t-value="event.event_ticket_ids.filtered(lambda ticket: not ticket.is_expired)"/>
|
||||
<!-- If some tickets expired and there is only one type left, we keep the same layout -->
|
||||
<t t-if="len(event.event_ticket_ids) > 1 or tickets.description">
|
||||
<t t-if="len(event.event_ticket_ids) > 1">
|
||||
<div class="d-flex align-items-center py-2 ps-3 pe-2 border-bottom">
|
||||
<span class="py-2 o_wevent_registration_title text-start">Tickets</span>
|
||||
<div class="o_wevent_price_range d-none"/>
|
||||
@@ -226,6 +226,10 @@
|
||||
<span t-if="tickets" t-field="tickets.name"/>
|
||||
<span t-else="">Registration</span>
|
||||
</h6>
|
||||
<t t-if="tickets.description">
|
||||
<small t-field="tickets.description" class="text-muted py-2"/>
|
||||
<br/>
|
||||
</t>
|
||||
<small t-if="tickets.end_sale_datetime and tickets.sale_available and not tickets.is_expired"
|
||||
class="text-muted ms-1 me-3" itemprop="availabilityEnds">
|
||||
Sales end on
|
||||
|
||||
Reference in New Issue
Block a user