From 85a4d44c9a494a213b57ab69a00cfa366bc1a0bd Mon Sep 17 00:00:00 2001 From: amdi-odoo Date: Tue, 5 Sep 2023 14:18:41 +0000 Subject: [PATCH] [IMP] {website_}event: improve registration desk view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Purpose ======= Registration Desk promenade. Bunch of QOL improvements to make the handling of events easier. Specification ============= - Modify the attendee search template to have the search in this order: * Participant (search in name, email and company) * Company * Booked by * Selected Answers * Ticket * Event (Just for the multi-event mode) - Make attendee registration status bar clickable to ease the state modification. - Attendee registration kanban view improvements: * Display the company. * Add a ticket icon in front of the ticket type. * Display the answers selected while registering (only for the questions of type selection) as tags. * Always use the fa-check icon for the card buttons (secondary for confirmed, primary for attended). * Add a button to go backwards (confirmed to unconfirmed, attended to confirmed) to ease the state modification from the kanban view. As we now have 2 buttons, widden their allocated space to make the clicks easier. Task-3469490 closes odoo/odoo#134479 X-original-commit: c95db124cac8031e928f8fcdc5d47ebbc7f7f341 Signed-off-by: Thibault Delavallee (tde) Signed-off-by: Amélie Dieudonné (amdi) --- addons/event/i18n/event.pot | 29 ++++++--- addons/event/models/event_registration.py | 4 ++ addons/event/static/src/scss/event.scss | 5 ++ .../event/views/event_registration_views.xml | 60 +++++++++++-------- .../models/event_registration.py | 2 + .../views/event_registration_views.xml | 13 +++- 6 files changed, 79 insertions(+), 34 deletions(-) diff --git a/addons/event/i18n/event.pot b/addons/event/i18n/event.pot index 2326d8f8a04..6ef2962793c 100644 --- a/addons/event/i18n/event.pot +++ b/addons/event/i18n/event.pot @@ -230,8 +230,8 @@ msgstr "" #. module: event #: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban msgid "" -"" +"" msgstr "" #. module: event @@ -253,16 +253,21 @@ msgstr "" #. module: event #: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban -msgid "" -"" +msgid "" msgstr "" #. module: event #: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban msgid "" -"" +"" +msgstr "" + +#. module: event +#: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban +msgid "" +"" msgstr "" #. module: event @@ -293,8 +298,8 @@ msgstr "" #. module: event #: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban msgid "" -"Attended\n" -" Canceled" +"Attended\n" +" Canceled" msgstr "" #. module: event @@ -2570,6 +2575,11 @@ msgstr "" msgid "Please enter a valid base64 secret" msgstr "" +#. module: event +#: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban +msgid "Previous state" +msgstr "" + #. module: event #: model_terms:event.event,description:event.event_2 msgid "Point of Sale (POS), Introduction to report customization." @@ -3156,6 +3166,7 @@ msgstr "" #. module: event #: model_terms:ir.ui.view,arch_db:event.event_event_ticket_view_form_from_event +#: model_terms:ir.ui.view,arch_db:event.event_registration_view_attendee_search msgid "Ticket" msgstr "" diff --git a/addons/event/models/event_registration.py b/addons/event/models/event_registration.py index 760116d24c7..df110b966a8 100644 --- a/addons/event/models/event_registration.py +++ b/addons/event/models/event_registration.py @@ -214,6 +214,10 @@ class EventRegistration(models.Model): # ACTIONS / BUSINESS # ------------------------------------------------------------ + def action_set_previous_state(self): + self.filtered(lambda reg: reg.state == 'open').action_set_draft() + self.filtered(lambda reg: reg.state == 'done').action_confirm() + def action_set_draft(self): self.write({'state': 'draft'}) diff --git a/addons/event/static/src/scss/event.scss b/addons/event/static/src/scss/event.scss index d66f1bc66f7..3e28ac4cb28 100644 --- a/addons/event/static/src/scss/event.scss +++ b/addons/event/static/src/scss/event.scss @@ -19,6 +19,11 @@ min-height: 80px; } } + // Used to align the kanban buttons as fa-check and fa-undo don't have the same width + .o_event_registration_kanban .fa-undo { + padding-left: 1px; + padding-right: 1px; + } .oe_kanban_card_ribbon { // Used for "Group By" div.row { diff --git a/addons/event/views/event_registration_views.xml b/addons/event/views/event_registration_views.xml index d2f9f8556a3..7f15ae3d867 100644 --- a/addons/event/views/event_registration_views.xml +++ b/addons/event/views/event_registration_views.xml @@ -54,7 +54,8 @@ invisible="not active or state != 'cancel' and state != 'done'"/>