Thursday, September 7, 2023
1 change · master
Enhancements to existing features
Event attendees can now open tickets directly in a responsive web page and download tickets more easily from emails and confirmation pages. The ticket layout is simplified for better printing and clearer attendee details, reducing friction after registration or purchase.
Original PR description
The tickets are reworked, made easier to print and have their structure reworked for qr code addition (in ENT branch). Also they are easier to download as buttons are added to do so. 1. Design…
The tickets are reworked, made easier to print and have their structure reworked for qr code addition (in ENT branch). Also they are easier to download as buttons are added to do so. 1. Design Tickets have their background removed in order to ease their printing. More room is given to details, the design is simplified. New SIMPLIFIED TICKET The confirmation email will now contain a link "See tickets" leading to a new version of the full page ticket, called "simplified". It does not generate / download PDF but rather leads to a rendered qweb html page, with design working properly on different screen sizes. The design is a tweaked version of the full_page ticket template. It allows user to see their ticket directly without needing a pdf viewer. 2. Download Tickets Buttons "Download / See Tickets" Buttons are added in - Email Templates (Ticket and Badge) - The SO confirmation (if payment). All tickets, per event. - The registration confirmation (if no payment). All tickets in the same PDF. They are for the same event. In order to access tickets, a route event/tickets_dl is added in the controller. It takes an event_id, registration_ids and a hash based on those plus the database secret using tools.hmac. The groundtruth hash is obtained for given registration ids in the method _get_tickets_dl_access_hash on event.event. The route is used in all places listed above. The hash must be valid and attendees must exist. No condition on payment is set in tickets_dl as we want the download tickets link to work for non-free tickets as well at the end of the sale process, and as the sale order could not be linked to any invoice at that stage (if automatic invoices is not set in the settings), registrations being 'not paid' at that point. This could be cleaned in further work as different states are to be clarified. The route must be public as it must work even for public users. (from email or as public user registering on front-end) 3. Email Templates In order to have similar mail templates for badge and tickets, Registration Badge content is duplicated from Registration Confirmation and slightly tweaked, replacing existing body. Also, the info of the payment / order moved from full page ticket to the body of the confirmation email. 4. Sending Tickets On Payment In order to ease the process to find tickets when they are linked to the sale order, they are now sent on payment. When an invoice is paid, we check on potential linked sale order lines if there are linked event registrations. If so, a message is posted on the SO record, sent to the associated partner, with pdf attachments: 1 per event, with all tickets. A comment message is used so that the tikets and comment can be found on the portal chatter of the SO as well, for portal users. PR ENT - https://github.com/odoo/enterprise/pull/41164 PR UPG - https://github.com/odoo/upgrade/pull/5007 Task-3061851