[IMP] event_*, website_event_*: improve UI
Purpose ======= Give the user a better experience when handling events by removing useless views and using coherent names of fields. Specifications ============== Add placeholders in multiple fields, change names in event_event module to be more consistent with each other, remove and add filters/measures in events and tracks. Task-2646692 closes odoo/odoo#77389 Related: odoo/enterprise#21294 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
committed by
Thibault Delavallée
parent
aa0cdacced
commit
44e5f0cd2c
@@ -131,22 +131,22 @@ class EventEvent(models.Model):
|
||||
legend_normal = fields.Char(related='stage_id.legend_normal', string='Kanban Ongoing Explanation', readonly=True)
|
||||
# Seats and computation
|
||||
seats_max = fields.Integer(
|
||||
string='Maximum Attendees Number',
|
||||
string='Maximum Attendees',
|
||||
compute='_compute_seats_max', readonly=False, store=True,
|
||||
help="For each event you can define a maximum registration of seats(number of attendees), above this numbers the registrations are not accepted.")
|
||||
seats_limited = fields.Boolean('Maximum Attendees', required=True, compute='_compute_seats_limited',
|
||||
seats_limited = fields.Boolean('Limit Attendees', required=True, compute='_compute_seats_limited',
|
||||
readonly=False, store=True)
|
||||
seats_reserved = fields.Integer(
|
||||
string='Reserved Seats',
|
||||
string='Number of Registrations',
|
||||
store=True, readonly=True, compute='_compute_seats')
|
||||
seats_available = fields.Integer(
|
||||
string='Available Seats',
|
||||
store=True, readonly=True, compute='_compute_seats')
|
||||
seats_unconfirmed = fields.Integer(
|
||||
string='Unconfirmed Seat Reservations',
|
||||
string='Unconfirmed Registrations',
|
||||
store=True, readonly=True, compute='_compute_seats')
|
||||
seats_used = fields.Integer(
|
||||
string='Number of Participants',
|
||||
string='Number of Attendees',
|
||||
store=True, readonly=True, compute='_compute_seats')
|
||||
seats_expected = fields.Integer(
|
||||
string='Number of Expected Attendees',
|
||||
|
||||
@@ -19,10 +19,10 @@ class EventTemplateTicket(models.Model):
|
||||
event_type_id = fields.Many2one(
|
||||
'event.type', string='Event Category', ondelete='cascade', required=True)
|
||||
# seats
|
||||
seats_limited = fields.Boolean(string='Seats Limit', readonly=True, store=True,
|
||||
seats_limited = fields.Boolean(string='Limit Attendees', readonly=True, store=True,
|
||||
compute='_compute_seats_limited')
|
||||
seats_max = fields.Integer(
|
||||
string='Maximum Seats',
|
||||
string='Maximum Attendees',
|
||||
help="Define the number of available tickets. If you have too many registrations you will "
|
||||
"not be able to sell tickets anymore. Set 0 to ignore this rule set as unlimited.")
|
||||
|
||||
|
||||
@@ -63,10 +63,16 @@
|
||||
</field>
|
||||
</page>
|
||||
<page string="Notes">
|
||||
<field name="note"/>
|
||||
<label for="ticket_instructions" string="Ticket Extra Instructions"></label>
|
||||
<br/>
|
||||
<field name="ticket_instructions" nolabel="1" class="pt-2"/>
|
||||
<group>
|
||||
<label for="note" string="Note" />
|
||||
<br />
|
||||
<field nolabel="1" colspan="2" name="note"
|
||||
placeholder="Add some internal notes (to do lists, contact info, ...)" />
|
||||
<label for="ticket_instructions" string="Ticket Intructions" />
|
||||
<br />
|
||||
<field nolabel="1" colspan="2" name="ticket_instructions"
|
||||
placeholder="e.g. How to get to your event, door closing time, ..." />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
@@ -246,10 +252,14 @@
|
||||
</page>
|
||||
<page string="Notes" name="event_notes">
|
||||
<group>
|
||||
<label for="note" string="Note"/><br/>
|
||||
<field nolabel="1" colspan="2" name="note" placeholder="Add a note..."/>
|
||||
<label for="ticket_instructions" string="Ticket Instructions"/><br/>
|
||||
<field nolabel="1" colspan="2" name="ticket_instructions"/>
|
||||
<label for="note" string="Note" />
|
||||
<br />
|
||||
<field nolabel="1" colspan="2" name="note"
|
||||
placeholder="Add some internal notes (to do lists, contact info, ...)" />
|
||||
<label for="ticket_instructions" string="Ticket Intructions" />
|
||||
<br />
|
||||
<field nolabel="1" colspan="2" name="ticket_instructions"
|
||||
placeholder="e.g. How to get to your event, door closing time, ..." />
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -408,8 +418,6 @@
|
||||
<field name="user_id"/>
|
||||
<field name="stage_id"/>
|
||||
<filter string="My Events" name="myevents" help="My Events" domain="[('user_id', '=', uid)]"/>
|
||||
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]"/>
|
||||
<separator/>
|
||||
<separator/>
|
||||
<filter string="Upcoming/Running" name="upcoming"
|
||||
domain="[('date_end', '>=', datetime.datetime.combine(context_today(), datetime.time(0,0,0)))]" help="Upcoming events from today" />
|
||||
@@ -672,8 +680,6 @@
|
||||
<field name="id" string="Registration ID"/>
|
||||
<field name="name" string="Participant" filter_domain="['|', ('name', 'ilike', self), ('email', 'ilike', self)]"/>
|
||||
<filter string="Ongoing Events" name="filter_is_ongoing" domain="[('event_id.is_ongoing', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction','=',True)]"/>
|
||||
<filter string="Expected" name="expected" domain="[('state', 'in', ['draft', 'open', 'done'])]"/>
|
||||
<separator/>
|
||||
<filter string="Unconfirmed" name="unconfirmed" domain="[('state', '=', 'draft')]"/>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Description" name="description">
|
||||
<field name="description"/>
|
||||
<field name="description" placeholder='e.g. "Those stands will be place near the entrance and..."'/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
|
||||
@@ -42,4 +42,15 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="event_event_view_search" model="ir.ui.view">
|
||||
<field name="name">event.event.search.inherit.website</field>
|
||||
<field name="model">event.event</field>
|
||||
<field name="inherit_id" ref="event.view_event_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//filter[@name='upcoming']" position="after">
|
||||
<separator/>
|
||||
<filter string="Published" name="filter_published" domain="[('website_published', '=', True)]"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
||||
@@ -261,14 +261,14 @@
|
||||
<xpath expr="//div[@id='o_wevent_index_sidebar']" position="inside">
|
||||
<div class="o_wevent_sidebar_block">
|
||||
<h6 class="o_wevent_sidebar_title">About us</h6>
|
||||
<p>Use this paragrah to write a short text about your events or company.</p>
|
||||
<p>Use this paragraph to write a short text about your events or company.</p>
|
||||
</div>
|
||||
<div id="oe_structure_website_event_about_us_1" class="oe_structure"/>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
<!-- Index - Sidebar - Follow us -->
|
||||
<template id="index_sidebar_follow_us" inherit_id="website_event.index_sidebar" active="True" customize_show="True" name="Follow us" priority="30">
|
||||
<template id="index_sidebar_follow_us" inherit_id="website_event.index_sidebar" active="False" customize_show="True" name="Follow us" priority="30">
|
||||
<xpath expr="//div[@id='o_wevent_index_sidebar']" position="inside">
|
||||
<div class="o_wevent_sidebar_block">
|
||||
<h6 class="o_wevent_sidebar_title">Follow Us</h6>
|
||||
@@ -292,13 +292,13 @@
|
||||
<a href="/event">
|
||||
<figure class="o_wevent_sidebar_block o_wevent_sidebar_figure figure">
|
||||
<img class="figure-img img-fluid rounded" src="/website_event/static/src/img/event_past_0.jpg" alt=""/>
|
||||
<figcaption class="figure-caption text-muted">A past event</figcaption>
|
||||
<figcaption class="figure-caption">A past event</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
<a href="/event">
|
||||
<figure class="o_wevent_sidebar_block o_wevent_sidebar_figure figure">
|
||||
<img class="figure-img img-fluid rounded" src="/website_event/static/src/img/event_training_0.jpg" alt=""/>
|
||||
<figcaption class="figure-caption text-muted">Our Trainings</figcaption>
|
||||
<figcaption class="figure-caption">Our Trainings</figcaption>
|
||||
</figure>
|
||||
</a>
|
||||
</xpath>
|
||||
|
||||
@@ -119,7 +119,8 @@
|
||||
<notebook>
|
||||
<page string="Description"
|
||||
attrs="{'invisible': [('exhibitor_type', '=', 'sponsor')]}">
|
||||
<field name="website_description" nolabel="1" options="{'noVideos': False}"/>
|
||||
<field name="website_description" nolabel="1" options="{'noVideos': False}"
|
||||
placeholder='e.g. "Openwood specializes in home decoration..."'/>
|
||||
</page>
|
||||
<page string="Online"
|
||||
attrs="{'invisible': [('exhibitor_type', '!=', 'online')]}">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Question">
|
||||
<sheet>
|
||||
<h1><field name="title" /></h1>
|
||||
<h1><field name="title" placeholder='e.g. "Do you have any diet restrictions?"' /></h1>
|
||||
<group>
|
||||
<group>
|
||||
<div colspan="2">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<data>
|
||||
<page name="event_notes" position="before">
|
||||
<page string="Questions" name="questions">
|
||||
<field name="question_ids" nolabel="1">
|
||||
<field name="question_ids" string="Question" nolabel="1">
|
||||
<tree>
|
||||
<field name="sequence" widget="handle" />
|
||||
<field name="title"/>
|
||||
@@ -42,7 +42,7 @@
|
||||
We need this because we create questions and answers when the event type changes. -->
|
||||
<form string="Question">
|
||||
<sheet>
|
||||
<h1><field name="title" /></h1>
|
||||
<h1><field name="title" placeholder='e.g. "Do you have any diet restrictions?"' /></h1>
|
||||
<group class="mb-0">
|
||||
<group class="mb-0">
|
||||
<div colspan="2">
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
<field name="partner_id"/>
|
||||
<filter string="My Tracks" name="my_tracks" domain="[('user_id', '=', uid)]"/>
|
||||
<separator/>
|
||||
<filter string="Published" name="filter_published" domain="[('website_published', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="Always Wishlisted" name="filter_wishlisted_by_default" domain="[('wishlisted_by_default', '=', True)]"/>
|
||||
@@ -212,11 +214,11 @@
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<field name="partner_biography" string="Biography"/>
|
||||
<field name="partner_biography" string="Biography" placeholder='e.g. "John Doe was born in..."'/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Description" name="description">
|
||||
<field name="description"/>
|
||||
<field name="description" placeholder='e.g. "This talk will be about..."'/>
|
||||
</page>
|
||||
<page string="Interactivity" name="interactivity">
|
||||
<group>
|
||||
@@ -276,6 +278,8 @@
|
||||
<graph string="Tracks" sample="1">
|
||||
<field name="location_id"/>
|
||||
<field name="duration" operator="+"/>
|
||||
<field name="website_cta_delay" invisible="1"/>
|
||||
<field name="color" invisible="1"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user