website_event_templates.xml 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="registration_template" inherit_id="website_event.registration_template">
  4. <!-- Add price information on tickets (multi tickets, aka in collapse) -->
  5. <xpath expr="//div[hasclass('o_wevent_registration_multi_select')]" position="inside">
  6. <t t-if="ticket.price">
  7. <t t-if="(ticket.price - ticket.price_reduce) &gt; 1 and website.pricelist_id.discount_policy == 'without_discount'">
  8. <del class="text-danger me-1" t-field="ticket.price" t-options="{'widget': 'monetary', 'from_currency': event.company_id.sudo().currency_id, 'display_currency': website.pricelist_id.currency_id}"/>
  9. </t>
  10. <span t-field="ticket.price_reduce"
  11. t-options="{'widget': 'monetary', 'from_currency': event.company_id.sudo().currency_id, 'display_currency': website.pricelist_id.currency_id}"
  12. groups="account.group_show_line_subtotals_tax_excluded"/>
  13. <span t-field="ticket.price_reduce_taxinc"
  14. t-options="{'widget': 'monetary', 'from_currency': event.company_id.sudo().currency_id, 'display_currency': website.pricelist_id.currency_id}"
  15. groups="account.group_show_line_subtotals_tax_included"/>
  16. <span itemprop="price" class="d-none" t-out="ticket.price"/>
  17. <span itemprop="priceCurrency" class="d-none" t-out="website.pricelist_id.currency_id.name"/>
  18. </t>
  19. <span t-else="" class="fw-bold text-uppercase">Free</span>
  20. </xpath>
  21. <xpath expr="//div[hasclass('o_wevent_price_range')]" position="inside">
  22. <t t-if="event.event_ticket_ids[-1].price_reduce > 0">
  23. <span class="text-dark">
  24. From
  25. <span t-out="event.event_ticket_ids[0].price_reduce" t-options="{'widget': 'monetary', 'from_currency': event.company_id.sudo().currency_id, 'display_currency': website.pricelist_id.currency_id}"/>
  26. <t t-if="event.event_ticket_ids[-1].price_reduce != event.event_ticket_ids[0].price_reduce">
  27. to
  28. <span t-out="event.event_ticket_ids[-1].price_reduce" t-options="{'widget': 'monetary', 'from_currency': event.company_id.sudo().currency_id, 'display_currency': website.pricelist_id.currency_id}"/>
  29. </t>
  30. </span>
  31. </t>
  32. </xpath>
  33. <!-- Add price information on tickets (mono ticket, aka not in collapse) -->
  34. <xpath expr="//div[hasclass('o_wevent_registration_single')]//h6" position="after">
  35. <div class="px-2 text-dark d-flex align-items-center align-self-stretch">
  36. <t t-if="tickets.price">
  37. <t t-if="(tickets.price - tickets.price_reduce) &gt;1 and website.get_current_pricelist().discount_policy == 'without_discount'">
  38. <del class="text-danger me-1" t-field="tickets.price" t-options="{'widget': 'monetary', 'from_currency': event.company_id.sudo().currency_id, 'display_currency': website.pricelist_id.currency_id}"/>
  39. </t>
  40. <span t-field="tickets.price_reduce"
  41. t-options="{'widget': 'monetary', 'from_currency': event.company_id.sudo().currency_id, 'display_currency': website.pricelist_id.currency_id}"
  42. groups="account.group_show_line_subtotals_tax_excluded"/>
  43. <span t-field="tickets.price_reduce_taxinc"
  44. t-options="{'widget': 'monetary', 'from_currency': event.company_id.sudo().currency_id, 'display_currency': website.pricelist_id.currency_id}"
  45. groups="account.group_show_line_subtotals_tax_included"/>
  46. <span itemprop="price" class="d-none" t-out="tickets.price"/>
  47. <span itemprop="priceCurrency" class="d-none" t-out="website.pricelist_id.currency_id.name"/>
  48. </t>
  49. <span t-else="" class="fw-bold text-uppercase">Free</span>
  50. </div>
  51. </xpath>
  52. </template>
  53. </odoo>