Skip to content

Commit 4bde914

Browse files
committed
[IMP] event: clarify the Timezone field name and tooltips
Issue: The current descriptions and naming of the `Date` fields (`date_begin`, `date_end`) and the `Timezone` field (`date_tz`) can be confusing in the form view of the event model. Specifically: The timezone used for converting the form dates to the database is determined by the context and not by the `Timezone` field present on the form. However, this `Timezone` field determines the timezone used for displaying the event's date/time on the website. This change tries to clarify the situation. opw-4323142 closes odoo#190867 Related: odoo/documentation#11596 Signed-off-by: Jérémy Hennecart (jeh) <[email protected]>
1 parent 190e45f commit 4bde914

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

addons/event/i18n/event.pot

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,6 +1997,13 @@ msgstr ""
19971997
msgid "In Progress"
19981998
msgstr ""
19991999

2000+
#. module: event
2001+
#: model:ir.model.fields,help:event.field_event_event__date_tz
2002+
msgid ""
2003+
"Indicates the timezone in which the event dates/times will be displayed on "
2004+
"the website."
2005+
msgstr ""
2006+
20002007
#. module: event
20012008
#: model:ir.model.fields,field_description:event.field_event_mail__interval_nbr
20022009
#: model:ir.model.fields,field_description:event.field_event_type_mail__interval_nbr
@@ -3376,6 +3383,14 @@ msgstr ""
33763383
msgid "Weeks"
33773384
msgstr ""
33783385

3386+
#. module: event
3387+
#: model:ir.model.fields,help:event.field_event_event__date_begin
3388+
#: model:ir.model.fields,help:event.field_event_registration__event_begin_date
3389+
msgid ""
3390+
"When the event is scheduled to take place (expressed in your local timezone "
3391+
"on the form view)."
3392+
msgstr ""
3393+
33793394
#. module: event
33803395
#: model_terms:event.event,description:event.event_0
33813396
msgid "What's new?"

addons/event/models/event_event.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,11 @@ def _default_event_mail_ids(self):
194194

195195
# Date fields
196196
date_tz = fields.Selection(
197-
_tz_get, string='Timezone', required=True,
198-
compute='_compute_date_tz', precompute=True, readonly=False, store=True)
199-
date_begin = fields.Datetime(string='Start Date', required=True, tracking=True)
197+
_tz_get, string='Display Timezone', required=True,
198+
compute='_compute_date_tz', precompute=True, readonly=False, store=True,
199+
help="Indicates the timezone in which the event dates/times will be displayed on the website.")
200+
date_begin = fields.Datetime(string='Start Date', required=True, tracking=True,
201+
help="When the event is scheduled to take place (expressed in your local timezone on the form view).")
200202
date_end = fields.Datetime(string='End Date', required=True, tracking=True)
201203
date_begin_located = fields.Char(string='Start Date Located', compute='_compute_date_begin_tz')
202204
date_end_located = fields.Char(string='End Date Located', compute='_compute_date_end_tz')

0 commit comments

Comments
 (0)