[IMP] {website_}event: improve registration desk view
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) <tde@openerp.com> Signed-off-by: Amélie Dieudonné (amdi) <amdi@odoo.com>
This commit is contained in:
@@ -230,8 +230,8 @@ msgstr ""
|
||||
#. module: event
|
||||
#: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban
|
||||
msgid ""
|
||||
"<i class=\"fa fa-check\" role=\"img\" aria-label=\"Confirm button\" "
|
||||
"title=\"Confirm Registration\"/>"
|
||||
"<i class=\"fa fa-check\" role=\"img\" aria-label=\"Attended button\" "
|
||||
"title=\"Confirm Attendance\"/>"
|
||||
msgstr ""
|
||||
|
||||
#. module: event
|
||||
@@ -253,16 +253,21 @@ msgstr ""
|
||||
|
||||
#. module: event
|
||||
#: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban
|
||||
msgid ""
|
||||
"<i class=\"fa fa-user-plus fa-3x\" role=\"img\" aria-label=\"Attended "
|
||||
"button\" title=\"Confirm Attendance\"/>"
|
||||
msgid "<i class=\"fa fa-ticket\" title=\"Ticket type\"/>"
|
||||
msgstr ""
|
||||
|
||||
#. module: event
|
||||
#: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban
|
||||
msgid ""
|
||||
"<i class=\"fa fa-user-plus\" role=\"img\" aria-label=\"Attended button\" "
|
||||
"title=\"Confirm Attendance\"/>"
|
||||
"<i class=\"fa fa-undo fa-3x\" role=\"img\" aria-label=\"Previous state "
|
||||
"button\" title=\"Previous state\"/>"
|
||||
msgstr ""
|
||||
|
||||
#. module: event
|
||||
#: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban
|
||||
msgid ""
|
||||
"<i class=\"fa fa-undo\" role=\"img\" aria-label=\"Previous state button\" "
|
||||
"title=\"Previous state\"/>"
|
||||
msgstr ""
|
||||
|
||||
#. module: event
|
||||
@@ -293,8 +298,8 @@ msgstr ""
|
||||
#. module: event
|
||||
#: model_terms:ir.ui.view,arch_db:event.event_registration_view_kanban
|
||||
msgid ""
|
||||
"<span class=\"text-muted\" states=\"done\">Attended</span>\n"
|
||||
" <span class=\"text-muted\" states=\"cancel\">Canceled</span>"
|
||||
"<span class=\"text-muted\" invisible=\"state != 'done'\">Attended</span>\n"
|
||||
" <span class=\"text-muted\" invisible=\"state != 'cancel'\">Canceled</span>"
|
||||
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 ""
|
||||
|
||||
|
||||
@@ -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'})
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -54,7 +54,8 @@
|
||||
invisible="not active or state != 'cancel' and state != 'done'"/>
|
||||
<button name="action_cancel" string="Cancel Registration" type="object"
|
||||
invisible="not active or state != 'open' and state != 'draft'"/>
|
||||
<field name="state" nolabel="1" colspan="2" widget="statusbar" statusbar_visible="draft,open,done"/>
|
||||
<field name="state" nolabel="1" colspan="2" widget="statusbar" statusbar_visible="draft,open,done"
|
||||
readonly="false" options="{'clickable': '1'}"/>
|
||||
</header>
|
||||
<sheet string="Registration">
|
||||
<div class="oe_button_box" name="button_box"/>
|
||||
@@ -108,36 +109,46 @@
|
||||
<templates>
|
||||
<t t-name="event_attendees_kanban_icons_desktop">
|
||||
<div class="d-none d-md-block h-100">
|
||||
<div id="event_attendees_kanban_icons_desktop" class="h-100 float-end p-2 d-flex align-items-end flex-column">
|
||||
<div id="event_attendees_kanban_icons_desktop" class="h-100 float-end p-2 d-flex align-items-end flex-column gap-1">
|
||||
<t t-if="record.active.raw_value">
|
||||
<a class="btn btn-md btn-primary" string="Confirm Registration" name="action_confirm" type="object" invisible="state != 'draft'" role="button">
|
||||
<a class="btn btn-md btn-secondary" string="Confirm Registration" name="action_confirm" type="object" invisible="state != 'draft'" role="button">
|
||||
<i class="fa fa-check" role="img" aria-label="Confirm button" title="Confirm Registration"/>
|
||||
</a>
|
||||
<a class="btn btn-md btn-primary" string="Confirm Attendance" name="action_set_done" type="object" invisible="state != 'open'" role="button">
|
||||
<i class="fa fa-user-plus" role="img" aria-label="Attended button" title="Confirm Attendance"/>
|
||||
<i class="fa fa-check" role="img" aria-label="Attended button" title="Confirm Attendance"/>
|
||||
</a>
|
||||
<span class="text-muted" invisible="state != 'done'">Attended</span>
|
||||
<span class="text-muted" invisible="state != 'cancel'">Canceled</span>
|
||||
</t>
|
||||
<a class="btn btn-md btn-secondary" string="Previous state" name="action_set_previous_state" type="object" role="button"
|
||||
invisible="state in ('cancel', 'draft')">
|
||||
<i class="fa fa-undo" role="img" aria-label="Previous state button" title="Previous state"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="event_attendees_kanban_icons_mobile">
|
||||
<div id="event_attendees_kanban_icons_mobile" class="d-md-none h-100 ps-4">
|
||||
<div id="event_attendees_kanban_icons_mobile" class="d-md-none d-flex align-items-end flex-column gap-1 h-100 ps-4">
|
||||
<t t-if="record.active.raw_value">
|
||||
<a class="btn btn-primary d-flex justify-content-center align-items-center h-100 w-100"
|
||||
<a class="btn btn-secondary d-flex justify-content-center align-items-center h-100 w-100"
|
||||
string="Confirm Registration" name="action_confirm" type="object" invisible="state != 'draft'" role="button">
|
||||
<i class="fa fa-check fa-3x" role="img" aria-label="Confirm button" title="Confirm Registration"/>
|
||||
</a>
|
||||
<a class="btn btn-primary d-flex justify-content-center align-items-center h-100 w-100"
|
||||
string="Confirm Attendance" name="action_set_done" type="object" invisible="state != 'open'" role="button">
|
||||
<i class="fa fa-user-plus fa-3x" role="img" aria-label="Attended button" title="Confirm Attendance"/>
|
||||
<i class="fa fa-check fa-3x" role="img" aria-label="Attended button" title="Confirm Attendance"/>
|
||||
</a>
|
||||
<div class="d-flex justify-content-center align-items-center h-100 w-100">
|
||||
<span class="text-muted" invisible="state != 'done'" >Attended</span>
|
||||
<span class="text-muted" invisible="state != 'cancel'" >Canceled</span>
|
||||
<div class="d-flex justify-content-center align-items-center h-100 w-100"
|
||||
invisible="state in ('open', 'draft')">
|
||||
<span class="text-muted" invisible="state != 'done'">Attended</span>
|
||||
<span class="text-muted" invisible="state != 'cancel'">Canceled</span>
|
||||
</div>
|
||||
</t>
|
||||
<a class="btn btn-secondary d-flex justify-content-center align-items-center h-100 w-100"
|
||||
string="Previous state" name="action_set_previous_state" type="object" role="button"
|
||||
invisible="state in ('cancel', 'draft')">
|
||||
<i class="fa fa-undo fa-3x" role="img" aria-label="Previous state button" title="Previous state"/>
|
||||
</a>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="kanban-box">
|
||||
@@ -146,23 +157,25 @@
|
||||
<span class="text-bg-danger">Archived</span>
|
||||
</div>
|
||||
<div class="row g-0 h-100">
|
||||
<div class="col-9">
|
||||
<div class="col-8 col-md-9">
|
||||
<div class="oe_kanban_content h-100">
|
||||
<div class="o_kanban_record_body h-100 d-flex flex-column">
|
||||
<b class="o_kanban_record_title"><field name="name"/></b>
|
||||
<field class="o_text_overflow" name="event_id" invisible="context.get('default_event_id')" readonly="state != 'draft'" />
|
||||
<field class="o_text_overflow text-primary" name="event_id" invisible="context.get('default_event_id')" readonly="state != 'draft'"/>
|
||||
<span class="o_text_overflow" invisible="not company_name">
|
||||
<i class="fa fa-building" title="Attendee Company"/> <field name="company_name"/>
|
||||
</span>
|
||||
<span class="o_text_overflow" invisible="not partner_id">Booked by <field name="partner_id" /></span>
|
||||
<div id="event_ticket_id" class="o_field_many2many_tags o_field_widget d-flex mt-auto">
|
||||
<div id="event_ticket_id" class="o_field_many2many_tags o_field_widget d-flex mt-auto align-items-center">
|
||||
<t t-if="record.event_ticket_id.raw_value">
|
||||
<div t-attf-class="badge rounded-pill o_tag o_tag_color_#{(record.event_ticket_id.raw_value % 11) + 1}" >
|
||||
<b><span class="o_badge_text o_text_overflow"><t t-out="record.event_ticket_id.value"/></span></b>
|
||||
</div>
|
||||
<i class="fa fa-ticket" title="Ticket type"/>
|
||||
<b><span class="o_badge_text o_text_overflow ms-1"><t t-out="record.event_ticket_id.value"/></span></b>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="event_attendees_kanban_icons" class="col-3">
|
||||
<div id="event_attendees_kanban_icons" class="col-4 col-md-3">
|
||||
<t t-call="event_attendees_kanban_icons_desktop"/>
|
||||
<t t-call="event_attendees_kanban_icons_mobile"/>
|
||||
</div>
|
||||
@@ -212,10 +225,13 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Event Registration">
|
||||
<field name="id" string="Registration ID"/>
|
||||
<field name="name" string="Participant" filter_domain="['|', '|', ('name', 'ilike', self), ('email', 'ilike', self), ('company_name', 'ilike', self)]"/>
|
||||
<field name="company_id"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="event_ticket_id" string="Ticket"/>
|
||||
<field name="event_id"/>
|
||||
<field name="event_user_id" string="Responsible"/>
|
||||
<field name="event_organizer_id" string="Organizer"/>
|
||||
<field name="name" string="Participant" filter_domain="['|', ('name', 'ilike', self), ('email', 'ilike', self)]"/>
|
||||
<field name="event_user_id" string="Responsible" invisible="1"/>
|
||||
<field name="event_organizer_id" string="Organizer" invisible="1"/>
|
||||
<filter string="Ongoing Events" name="filter_is_ongoing" domain="[('event_id.is_ongoing', '=', True)]"/>
|
||||
<filter string="Expected" name="expected" domain="[('state', 'in', ['draft', 'open', 'done'])]"/>
|
||||
<separator/>
|
||||
@@ -226,8 +242,6 @@
|
||||
<filter string="Registration Date" name="filter_create_date" date="create_date"/>
|
||||
<filter string="Event Start Date" name="filter_event_begin_date" date="event_begin_date"/>
|
||||
<filter string="Attended Date" name="filter_date_closed" date="date_closed"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="company_id"/>
|
||||
<separator/>
|
||||
<filter invisible="1" string="Late Activities" name="activities_overdue"
|
||||
domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"
|
||||
@@ -268,8 +282,6 @@
|
||||
<field name="priority">32</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//search/field[@name='event_id']" position="replace"/>
|
||||
<xpath expr="//search/field[@name='event_user_id']" position="replace"/>
|
||||
<xpath expr="//search/field[@name='event_organizer_id']" position="replace"/>
|
||||
<xpath expr="//search/filter[@name='filter_is_ongoing']" position="replace"/>
|
||||
<xpath expr="//search/group/filter[@name='group_event']" position="replace"/>
|
||||
</field>
|
||||
|
||||
@@ -10,6 +10,8 @@ class EventRegistration(models.Model):
|
||||
|
||||
visitor_id = fields.Many2one('website.visitor', string='Visitor', ondelete='set null')
|
||||
registration_answer_ids = fields.One2many('event.registration.answer', 'registration_id', string='Attendee Answers')
|
||||
registration_answer_choice_ids = fields.One2many('event.registration.answer', 'registration_id', string='Attendee Selection Answers',
|
||||
domain=[('question_type', '=', 'simple_choice')])
|
||||
|
||||
def _get_website_registration_allowed_fields(self):
|
||||
return {'name', 'phone', 'email', 'mobile', 'company_name', 'event_id', 'partner_id', 'event_ticket_id'}
|
||||
|
||||
@@ -78,12 +78,23 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="event_registration_view_kanban" model="ir.ui.view">
|
||||
<field name="name">event.registration.kanban.inherit.online</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="inherit_id" ref="event.event_registration_view_kanban"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@id='event_ticket_id']" position="before">
|
||||
<field name="registration_answer_choice_ids" class="mt-1" widget="many2many_tags"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="event_registration_view_search" model="ir.ui.view">
|
||||
<field name="name">event.registration.view.search.inherit.online</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="inherit_id" ref="event.view_registration_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="company_id" position="after">
|
||||
<field name="partner_id" position="after">
|
||||
<field name="registration_answer_ids" string="Selected Answers"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user