[IMP] event: hide barcode

When barcode/QR code isn't available '123456789' placeholder
is inserted which might be misleading. The change makes sure
to show barcode/QR code only when they are available.

task-3411827

Part-of: odoo/odoo#135153
This commit is contained in:
dane@odoo.com
2023-10-05 16:49:01 +00:00
parent 9476597594
commit a653d22aeb
@@ -159,9 +159,14 @@
<div class="o_event_full_page_ticket_barcode">
<div class="o_event_full_page_ticket_barcode_container px-2">
<div class="pb-3"><img t-attf-src="/report/barcode/QR/{{attendee.barcode if attendee else '12345678901234567890'}}?&amp;width=116&amp;height=116&amp;quiet=0" alt="QR Code"/></div>
<t t-if="env['ir.config_parameter'].sudo().get_param('event.use_event_barcode') == 'True'">
<img class="o_event_barcode" t-attf-src="/report/barcode/?barcode_type=Code128&amp;value={{attendee.barcode if attendee else '12345678901234567890'}}&amp;width=168&amp;height=84&amp;humanreadable=1&amp;quiet=0" alt="Barcode"/>
<t t-if="not attendee or (attendee and attendee.barcode)">
<div class="pb-3">
<img t-attf-src="/report/barcode/QR/{{attendee.barcode if attendee and attendee.barcode else '12345678901234567890'}}?&amp;width=116&amp;height=116&amp;quiet=0" alt="QR Code"/>
</div>
<t t-if="env['ir.config_parameter'].sudo().get_param('event.use_event_barcode') == 'True'">
<img class="o_event_barcode" t-attf-src="/report/barcode/?barcode_type=Code128&amp;value={{attendee.barcode if attendee and attendee.barcode else '12345678901234567890'}}&amp;width=168&amp;height=84&amp;humanreadable=1&amp;quiet=0" alt="Barcode"/>
</t>
</t>
</div>
</div>