From 4ac288b9444229729f01f1ec7c14121fbd2bab0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 29 Jul 2020 08:52:00 +0000 Subject: [PATCH 1/9] [REF] event: improve (and fix) default email templates RATIONALE Events are sometimes held online, gathering a community. In this merge we improve Event application to better support full-online events with improved tracks, wishlists, chat rooms, ... PURPOSE Prepare Event Online support by providing fixes in registration and event frontend flows. Also provide a quick back2basic in backend views to prepare addition of Online sub modules. SPECIFICATIONS: CONFIRMATION / REMINDER EMAIL Reorder a bit content: add links to add to calendar directly in header text, between confirmation and signature. Add a section holding a link to PWA in order to showcase it to customers. Apply fixes : * correctly use 50% width only for date / location display when location is not set; * correctly put jinja tags to make valid html, otherwise edit / save template breaks it when browse move jinja tags a bit randomly (e.g. %if between tr tag is not valid html and broken by design); * correctly compute horizontal separation lines, display them only when there is actually some content to separate; * correctly support organizer / no organizer, address / no address and online / not online in all template; Notes: this require to re-generate the whole translations templates of both templates but this seems a required pain. Indeed current template are broken beyong redemption. Fixes notably cfca2bb0ffa8a16aeafa3c4114c7f731ee0c87d9 LINKS Community PR odoo/odoo#55197 Enterprise PR odoo/enterprise#12113 Task ID-2309702 (Event Preparatory Merge 4) Prepares Task ID-2252655 (Main Online Event task) Prepares Task ID-2283796 (Event B2Basics / Registration Flow) Prepares Task ID-2299857 (Event Design Review) --- addons/event/data/email_template_data.xml | 390 +++++++++++++--------- addons/event/i18n/event.pot | 386 ++++++++++++--------- 2 files changed, 444 insertions(+), 332 deletions(-) diff --git a/addons/event/data/email_template_data.xml b/addons/event/data/email_template_data.xml index 9ee4351ff89..b41bd61c623 100644 --- a/addons/event/data/email_template_data.xml +++ b/addons/event/data/email_template_data.xml @@ -37,6 +37,9 @@ - - % if object.event_id.organizer_id: - - % endif - - % if object.event_id.address_id: + + + + + + + - % endif
% set date_begin = format_datetime(object.event_id.date_begin, tz='UTC', dt_format='%Y%m%dT%H%M%SZ') % set date_end = format_datetime(object.event_id.date_end, tz='UTC', dt_format='%Y%m%dT%H%M%SZ') +% set is_online = 'is_published' in object.event_id and object.event_id.is_published +% set event_organizer = object.event_id.organizer_id +% set event_address = object.event_id.address_id @@ -49,7 +52,14 @@ ${object.name} - % if object.event_id.address_id.country_id.name: - - - % endif - -
+ % if is_online + + View Event + + % else ${'%s' % object.company_id.name} + % endif

@@ -65,27 +75,31 @@
Hello ${object.name or ''},
We are happy to confirm your registration to the event - % if 'website_published' in object.event_id and object.event_id.website_published: + % if is_online: ${object.event_id.name} % else: ${object.event_id.name} % endif for attendee ${object.name}.
- % if 'website_published' in object.event_id and object.event_id.website_published: -
- View Event
+
+
+ Add this event to your calendar + Google + iCal/Outlook + + Yahoo + +

- % endif
See you soon,
--
- % if object.event_id.organizer_id: - ${object.event_id.organizer_id.name} + % if event_organizer: + ${event_organizer.name} % else: - The organizers. + The ${object.event_id.name} Team % endif
@@ -111,84 +125,98 @@
To ${object.event_id.date_end_located}
TZ ${object.event_id.date_tz}
- - - % set location = '' - % if object.event_id.address_id.name: -
${object.event_id.address_id.name}
- % endif - % if object.event_id.address_id.street: -
${object.event_id.address_id.street}
- % set location = object.event_id.address_id.street - % endif - % if object.event_id.address_id.street2: -
${object.event_id.address_id.street2}
- % set location = '%s, %s' % (location, object.event_id.address_id.street2) - % endif -
- % if object.event_id.address_id.city: - ${object.event_id.address_id.city}, - % set location = '%s, %s' % (location, object.event_id.address_id.city) - % endif - % if object.event_id.address_id.state_id.name: - ${object.event_id.address_id.state_id.name}, - % set location = '%s, %s' % (location, object.event_id.address_id.state_id.name) - % endif - % if object.event_id.address_id.zip: - ${object.event_id.address_id.zip} - % set location = '%s, %s' % (location, object.event_id.address_id.zip) - % endif -
- % if object.event_id.address_id.country_id.name: -
${object.event_id.address_id.country_id.name}
- % set location = '%s, %s' % (location, object.event_id.address_id.country_id.name) - % endif -
-
-
-
-
- Questions about this event? -
Please contact the organizer:
-
    -
  • ${object.event_id.organizer_id.name}
  • - % if object.event_id.organizer_id.email -
  • Mail: ${object.event_id.organizer_id.email}
  • - % endif - % if object.event_id.organizer_id.phone -
  • Phone: ${object.event_id.organizer_id.phone}
  • - % endif -
-
-
- - - +
- Add this event to your calendar - Google - iCal/Outlook - - Yahoo + + % if event_address: + + % endif + + % if event_address: + % set location = '' + % if object.event_id.address_id.name: +
${object.event_id.address_id.name}
+ % endif + % if object.event_id.address_id.street: +
${object.event_id.address_id.street}
+ % set location = object.event_id.address_id.street + % endif + % if object.event_id.address_id.street2: +
${object.event_id.address_id.street2}
+ % set location = '%s, %s' % (location, object.event_id.address_id.street2) + % endif +
+ % if object.event_id.address_id.city: + ${object.event_id.address_id.city}, + % set location = '%s, %s' % (location, object.event_id.address_id.city) + % endif + % if object.event_id.address_id.state_id.name: + ${object.event_id.address_id.state_id.name}, + % set location = '%s, %s' % (location, object.event_id.address_id.state_id.name) + % endif + % if object.event_id.address_id.zip: + ${object.event_id.address_id.zip} + % set location = '%s, %s' % (location, object.event_id.address_id.zip) + % endif +
+ % if object.event_id.address_id.country_id.name: +
${object.event_id.address_id.country_id.name}
+ % set location = '%s, %s' % (location, object.event_id.address_id.country_id.name) + % endif + % endif
-
+ % if event_organizer +
+ % endif
+ + % if event_organizer: +
+ Questions about this event? +
Please contact the organizer:
+
    +
  • ${event_organizer.name}
  • + % if event_organizer.email +
  • Mail: ${event_organizer.email}
  • + % endif + % if event_organizer.phone +
  • Phone: ${event_organizer.phone}
  • + % endif +
+
+ % endif +
+ + % if is_online or event_address: +
+ % endif +
+ + % if is_online: +
+ Get the best mobile experience. + Install our mobile app +
+ % endif +
+ + % if is_online and event_address: +
+ % endif +
+ + % if event_address:
+ % endif
@@ -205,19 +233,19 @@ -% if object.company_id + % if object.company_id
Sent by ${object.company_id.name} - % if 'website_url' in object.event_id and object.event_id.website_url: + % if is_online:
Discover all our events. % endif
+ % endif -% endif ${object.partner_id.lang} @@ -233,6 +261,9 @@ - - % if object.event_id.organizer_id: - - % endif - - % if object.event_id.address_id: + + + + + + + - % endif
% set date_begin = format_datetime(object.event_id.date_begin, tz='UTC', dt_format='%Y%m%dT%H%M%SZ') % set date_end = format_datetime(object.event_id.date_end, tz='UTC', dt_format='%Y%m%dT%H%M%SZ') +% set is_online = 'is_published' in object.event_id and object.event_id.is_published +% set event_organizer = object.event_id.organizer_id +% set event_address = object.event_id.address_id @@ -245,7 +276,14 @@ ${object.name} - % if object.event_id.address_id.country_id.name: - - - % endif - -
+ % if is_online + + View Event + + % else ${'%s' % object.company_id.name} + % endif

@@ -261,27 +299,31 @@
Hello ${object.name},
We are excited to remind you that the event - % if 'website_published' in object.event_id and object.event_id.website_published: + % if is_online: ${object.event_id.name} % else: ${object.event_id.name} % endif is starting ${object.get_date_range_str()}.
- % if 'website_published' in object.event_id and object.event_id.website_published: -
- View Event
+
+
+ Add this event to your calendar + Google + iCal/Outlook + + Yahoo + +

- % endif
We confirm your registration and hope to meet you there,
--
- % if object.event_id.organizer_id: - ${object.event_id.organizer_id.name} + % if event_organizer: + ${event_organizer.name} % else: - The organizers. + The ${object.event_id.name} Team % endif
@@ -307,84 +349,98 @@
To ${object.event_id.date_end_located}
TZ ${object.event_id.date_tz}
- - - % set location = '' - % if object.event_id.address_id.name: -
${object.event_id.address_id.name}
- % endif - % if object.event_id.address_id.street: -
${object.event_id.address_id.street}
- % set location = object.event_id.address_id.street - % endif - % if object.event_id.address_id.street2: -
${object.event_id.address_id.street2}
- % set location = '%s, %s' % (location, object.event_id.address_id.street2) - % endif -
- % if object.event_id.address_id.city: - ${object.event_id.address_id.city}, - % set location = '%s, %s' % (location, object.event_id.address_id.city) - % endif - % if object.event_id.address_id.state_id.name: - ${object.event_id.address_id.state_id.name}, - % set location = '%s, %s' % (location, object.event_id.address_id.state_id.name) - % endif - % if object.event_id.address_id.zip: - ${object.event_id.address_id.zip} - % set location = '%s, %s' % (location, object.event_id.address_id.zip) - % endif -
- % if object.event_id.address_id.country_id.name: -
${object.event_id.address_id.country_id.name}
- % set location = '%s, %s' % (location, object.event_id.address_id.country_id.name) - % endif -
-
-
-
-
- Questions about this event? -
Please contact the organizer:
-
    -
  • ${object.event_id.organizer_id.name}
  • - % if object.event_id.organizer_id.email -
  • Mail: ${object.event_id.organizer_id.email}
  • - % endif - % if object.event_id.organizer_id.phone -
  • Phone: ${object.event_id.organizer_id.phone}
  • - % endif -
-
-
- - - +
- Add this event to your calendar - Google - iCal/Outlook - - Yahoo + + % if event_address: + + % endif + + % if event_address: + % set location = '' + % if object.event_id.address_id.name: +
${object.event_id.address_id.name}
+ % endif + % if object.event_id.address_id.street: +
${object.event_id.address_id.street}
+ % set location = object.event_id.address_id.street + % endif + % if object.event_id.address_id.street2: +
${object.event_id.address_id.street2}
+ % set location = '%s, %s' % (location, object.event_id.address_id.street2) + % endif +
+ % if object.event_id.address_id.city: + ${object.event_id.address_id.city}, + % set location = '%s, %s' % (location, object.event_id.address_id.city) + % endif + % if object.event_id.address_id.state_id.name: + ${object.event_id.address_id.state_id.name}, + % set location = '%s, %s' % (location, object.event_id.address_id.state_id.name) + % endif + % if object.event_id.address_id.zip: + ${object.event_id.address_id.zip} + % set location = '%s, %s' % (location, object.event_id.address_id.zip) + % endif +
+ % if object.event_id.address_id.country_id.name: +
${object.event_id.address_id.country_id.name}
+ % set location = '%s, %s' % (location, object.event_id.address_id.country_id.name) + % endif + % endif
-
+ % if event_organizer +
+ % endif
+ + % if event_organizer: +
+ Questions about this event? +
Please contact the organizer:
+
    +
  • ${event_organizer.name}
  • + % if event_organizer.email +
  • Mail: ${event_organizer.email}
  • + % endif + % if event_organizer.phone +
  • Phone: ${event_organizer.phone}
  • + % endif +
+
+ % endif +
+ + % if is_online or event_address: +
+ % endif +
+ + % if is_online: +
+ Get the best mobile experience. + Install our mobile app +
+ % endif +
+ + % if is_online and event_address: +
+ % endif +
+ + % if event_address:
+ % endif
@@ -401,8 +457,8 @@ -% if object.company_id + % if object.company_id
Sent by ${object.company_id.name} @@ -412,8 +468,8 @@ % endif
+ % endif -% endif ${object.partner_id.lang} diff --git a/addons/event/i18n/event.pot b/addons/event/i18n/event.pot index b4b442d5be4..e0a20e33ecc 100644 --- a/addons/event/i18n/event.pot +++ b/addons/event/i18n/event.pot @@ -122,6 +122,9 @@ msgid "" "\n" -" \n" -" % if object.event_id.organizer_id:\n" -" \n" -" % endif\n" -" \n" " \n" -" % if object.event_id.address_id:\n" +"\n" " \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" -" % endif\n" "
\n" "% set date_begin = format_datetime(object.event_id.date_begin, tz='UTC', dt_format='%Y%m%dT%H%M%SZ')\n" "% set date_end = format_datetime(object.event_id.date_end, tz='UTC', dt_format='%Y%m%dT%H%M%SZ')\n" +"% set is_online = 'is_published' in object.event_id and object.event_id.is_published\n" +"% set event_organizer = object.event_id.organizer_id\n" +"% set event_address = object.event_id.address_id\n" "\n" "\n" " \n" @@ -134,7 +137,13 @@ msgid "" " ${object.name}\n" " \n" " \n" " \n" -" % if object.event_id.address_id.country_id.name:\n" -" \n" -" \n" -" % endif\n" -" \n" -"
\n" +" % if is_online\n" +" \n" +" View Event\n" +" \n" +" % else\n" " \"${'%s'\n" +" % endif\n" "
\n" "
\n" @@ -150,26 +159,31 @@ msgid "" "
\n" " Hello ${object.name or ''},
\n" " We are happy to confirm your registration to the event\n" -" % if 'website_published' in object.event_id and object.event_id.website_published:\n" +" % if is_online:\n" " ${object.event_id.name}\n" " % else:\n" " ${object.event_id.name}\n" " % endif\n" " for attendee ${object.name}.\n" "
\n" -" % if 'website_published' in object.event_id and object.event_id.website_published:\n" -"
\n" -" View Event
\n" +"
\n" +"
\n" +" Add this event to your calendar\n" +" \"\"/ Google\n" +" \"\"/ iCal/Outlook\n" +" \n" +" \"\"/ Yahoo\n" +" \n" +"

\n" "
\n" -" % endif\n" "
\n" " See you soon,
\n" " \n" " --
\n" -" % if object.event_id.organizer_id:\n" -" ${object.event_id.organizer_id.name}\n" +" % if event_organizer:\n" +" ${event_organizer.name}\n" " % else:\n" -" The organizers.\n" +" The ${object.event_id.name} Team\n" " % endif\n" "
\n" "
\n" @@ -195,84 +209,98 @@ msgid "" "
To ${object.event_id.date_end_located}
\n" "
TZ ${object.event_id.date_tz}
\n" "
\n" -" \"\"/\n" -" \n" -" % set location = ''\n" -" % if object.event_id.address_id.name:\n" -"
${object.event_id.address_id.name}
\n" -" % endif\n" -" % if object.event_id.address_id.street:\n" -"
${object.event_id.address_id.street}
\n" -" % set location = object.event_id.address_id.street\n" -" % endif\n" -" % if object.event_id.address_id.street2:\n" -"
${object.event_id.address_id.street2}
\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.street2)\n" -" % endif\n" -"
\n" -" % if object.event_id.address_id.city:\n" -" ${object.event_id.address_id.city},\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.city)\n" -" % endif\n" -" % if object.event_id.address_id.state_id.name:\n" -" ${object.event_id.address_id.state_id.name},\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.state_id.name)\n" -" % endif\n" -" % if object.event_id.address_id.zip:\n" -" ${object.event_id.address_id.zip}\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.zip)\n" -" % endif\n" -"
\n" -" % if object.event_id.address_id.country_id.name:\n" -"
${object.event_id.address_id.country_id.name}
\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.country_id.name)\n" -" % endif\n" -"
\n" -"
\n" -"
\n" -"
\n" -"
\n" -" Questions about this event?\n" -"
Please contact the organizer:
\n" -"
    \n" -"
  • ${object.event_id.organizer_id.name}
  • \n" -" % if object.event_id.organizer_id.email\n" -"
  • Mail: ${object.event_id.organizer_id.email}
  • \n" -" % endif\n" -" % if object.event_id.organizer_id.phone\n" -"
  • Phone: ${object.event_id.organizer_id.phone}
  • \n" -" % endif\n" -"
\n" -"
\n" -"
\n" -" \n" -" \n" -" \n" +" \n" " \n" "
\n" -" Add this event to your calendar\n" -" \"\"/ Google\n" -" \"\"/ iCal/Outlook\n" -" \n" -" \"\"/ Yahoo\n" +" \n" +" % if event_address:\n" +" \"\"/\n" +" % endif\n" +" \n" +" % if event_address:\n" +" % set location = ''\n" +" % if object.event_id.address_id.name:\n" +"
${object.event_id.address_id.name}
\n" +" % endif\n" +" % if object.event_id.address_id.street:\n" +"
${object.event_id.address_id.street}
\n" +" % set location = object.event_id.address_id.street\n" +" % endif\n" +" % if object.event_id.address_id.street2:\n" +"
${object.event_id.address_id.street2}
\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.street2)\n" +" % endif\n" +"
\n" +" % if object.event_id.address_id.city:\n" +" ${object.event_id.address_id.city},\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.city)\n" +" % endif\n" +" % if object.event_id.address_id.state_id.name:\n" +" ${object.event_id.address_id.state_id.name},\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.state_id.name)\n" +" % endif\n" +" % if object.event_id.address_id.zip:\n" +" ${object.event_id.address_id.zip}\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.zip)\n" +" % endif\n" +"
\n" +" % if object.event_id.address_id.country_id.name:\n" +"
${object.event_id.address_id.country_id.name}
\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.country_id.name)\n" +" % endif\n" +" % endif\n" "
\n" "
\n" -"
\n" +" % if event_organizer\n" +"
\n" +" % endif\n" "
\n" +" \n" +" % if event_organizer:\n" +"
\n" +" Questions about this event?\n" +"
Please contact the organizer:
\n" +"
    \n" +"
  • ${event_organizer.name}
  • \n" +" % if event_organizer.email\n" +"
  • Mail: ${event_organizer.email}
  • \n" +" % endif\n" +" % if event_organizer.phone\n" +"
  • Phone: ${event_organizer.phone}
  • \n" +" % endif\n" +"
\n" +"
\n" +" % endif\n" +"
\n" +" \n" +" % if is_online or event_address:\n" +"
\n" +" % endif\n" +"
\n" +" \n" +" % if is_online:\n" +"
\n" +" Get the best mobile experience.\n" +" Install our mobile app\n" +"
\n" +" % endif\n" +"
\n" +" \n" +" % if is_online and event_address:\n" +"
\n" +" % endif\n" +"
\n" +" \n" +" % if event_address:\n" "
\n" " \n" "
\n" +" % endif\n" "
\n" " \n" " \n" @@ -289,19 +317,19 @@ msgid "" "\n" "\n" "\n" -"% if object.company_id\n" "\n" +" % if object.company_id\n" " \n" " \n" "
\n" " Sent by ${object.company_id.name}\n" -" % if 'website_url' in object.event_id and object.event_id.website_url:\n" +" % if is_online:\n" "
\n" " Discover all our events.\n" " % endif\n" "
\n" +" % endif\n" "\n" -"% endif\n" "\n" " " msgstr "" @@ -312,6 +340,9 @@ msgid "" "\n" -" \n" -" % if object.event_id.organizer_id:\n" -" \n" -" % endif\n" -" \n" " \n" -" % if object.event_id.address_id:\n" +"\n" " \n" +" \n" +"\n" +" \n" +" \n" +"\n" +" \n" -" % endif\n" "
\n" "% set date_begin = format_datetime(object.event_id.date_begin, tz='UTC', dt_format='%Y%m%dT%H%M%SZ')\n" "% set date_end = format_datetime(object.event_id.date_end, tz='UTC', dt_format='%Y%m%dT%H%M%SZ')\n" +"% set is_online = 'is_published' in object.event_id and object.event_id.is_published\n" +"% set event_organizer = object.event_id.organizer_id\n" +"% set event_address = object.event_id.address_id\n" "\n" "\n" " \n" @@ -324,7 +355,13 @@ msgid "" " ${object.name}\n" " \n" " \n" " \n" -" % if object.event_id.address_id.country_id.name:\n" -" \n" -" \n" -" % endif\n" -" \n" -"
\n" +" % if is_online\n" +" \n" +" View Event\n" +" \n" +" % else\n" " \"${'%s'\n" +" % endif\n" "
\n" "
\n" @@ -340,26 +377,31 @@ msgid "" "
\n" " Hello ${object.name},
\n" " We are excited to remind you that the event\n" -" % if 'website_published' in object.event_id and object.event_id.website_published:\n" +" % if is_online:\n" " ${object.event_id.name}\n" " % else:\n" " ${object.event_id.name}\n" " % endif\n" " is starting ${object.get_date_range_str()}.\n" "
\n" -" % if 'website_published' in object.event_id and object.event_id.website_published:\n" -"
\n" -" View Event
\n" +"
\n" +"
\n" +" Add this event to your calendar\n" +" \"\"/ Google\n" +" \"\"/ iCal/Outlook\n" +" \n" +" \"\"/ Yahoo\n" +" \n" +"

\n" "
\n" -" % endif\n" "
\n" " We confirm your registration and hope to meet you there,
\n" " \n" " --
\n" -" % if object.event_id.organizer_id:\n" -" ${object.event_id.organizer_id.name}\n" +" % if event_organizer:\n" +" ${event_organizer.name}\n" " % else:\n" -" The organizers.\n" +" The ${object.event_id.name} Team\n" " % endif\n" "
\n" "
\n" @@ -385,84 +427,98 @@ msgid "" "
To ${object.event_id.date_end_located}
\n" "
TZ ${object.event_id.date_tz}
\n" "
\n" -" \"\"/\n" -" \n" -" % set location = ''\n" -" % if object.event_id.address_id.name:\n" -"
${object.event_id.address_id.name}
\n" -" % endif\n" -" % if object.event_id.address_id.street:\n" -"
${object.event_id.address_id.street}
\n" -" % set location = object.event_id.address_id.street\n" -" % endif\n" -" % if object.event_id.address_id.street2:\n" -"
${object.event_id.address_id.street2}
\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.street2)\n" -" % endif\n" -"
\n" -" % if object.event_id.address_id.city:\n" -" ${object.event_id.address_id.city},\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.city)\n" -" % endif\n" -" % if object.event_id.address_id.state_id.name:\n" -" ${object.event_id.address_id.state_id.name},\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.state_id.name)\n" -" % endif\n" -" % if object.event_id.address_id.zip:\n" -" ${object.event_id.address_id.zip}\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.zip)\n" -" % endif\n" -"
\n" -" % if object.event_id.address_id.country_id.name:\n" -"
${object.event_id.address_id.country_id.name}
\n" -" % set location = '%s, %s' % (location, object.event_id.address_id.country_id.name)\n" -" % endif\n" -"
\n" -"
\n" -"
\n" -"
\n" -"
\n" -" Questions about this event?\n" -"
Please contact the organizer:
\n" -"
    \n" -"
  • ${object.event_id.organizer_id.name}
  • \n" -" % if object.event_id.organizer_id.email\n" -"
  • Mail: ${object.event_id.organizer_id.email}
  • \n" -" % endif\n" -" % if object.event_id.organizer_id.phone\n" -"
  • Phone: ${object.event_id.organizer_id.phone}
  • \n" -" % endif\n" -"
\n" -"
\n" -"
\n" -" \n" -" \n" -" \n" +" \n" " \n" "
\n" -" Add this event to your calendar\n" -" \"\"/ Google\n" -" \"\"/ iCal/Outlook\n" -" \n" -" \"\"/ Yahoo\n" +" \n" +" % if event_address:\n" +" \"\"/\n" +" % endif\n" +" \n" +" % if event_address:\n" +" % set location = ''\n" +" % if object.event_id.address_id.name:\n" +"
${object.event_id.address_id.name}
\n" +" % endif\n" +" % if object.event_id.address_id.street:\n" +"
${object.event_id.address_id.street}
\n" +" % set location = object.event_id.address_id.street\n" +" % endif\n" +" % if object.event_id.address_id.street2:\n" +"
${object.event_id.address_id.street2}
\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.street2)\n" +" % endif\n" +"
\n" +" % if object.event_id.address_id.city:\n" +" ${object.event_id.address_id.city},\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.city)\n" +" % endif\n" +" % if object.event_id.address_id.state_id.name:\n" +" ${object.event_id.address_id.state_id.name},\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.state_id.name)\n" +" % endif\n" +" % if object.event_id.address_id.zip:\n" +" ${object.event_id.address_id.zip}\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.zip)\n" +" % endif\n" +"
\n" +" % if object.event_id.address_id.country_id.name:\n" +"
${object.event_id.address_id.country_id.name}
\n" +" % set location = '%s, %s' % (location, object.event_id.address_id.country_id.name)\n" +" % endif\n" +" % endif\n" "
\n" "
\n" -"
\n" +" % if event_organizer\n" +"
\n" +" % endif\n" "
\n" +" \n" +" % if event_organizer:\n" +"
\n" +" Questions about this event?\n" +"
Please contact the organizer:
\n" +"
    \n" +"
  • ${event_organizer.name}
  • \n" +" % if event_organizer.email\n" +"
  • Mail: ${event_organizer.email}
  • \n" +" % endif\n" +" % if event_organizer.phone\n" +"
  • Phone: ${event_organizer.phone}
  • \n" +" % endif\n" +"
\n" +"
\n" +" % endif\n" +"
\n" +" \n" +" % if is_online or event_address:\n" +"
\n" +" % endif\n" +"
\n" +" \n" +" % if is_online:\n" +"
\n" +" Get the best mobile experience.\n" +" Install our mobile app\n" +"
\n" +" % endif\n" +"
\n" +" \n" +" % if is_online and event_address:\n" +"
\n" +" % endif\n" +"
\n" +" \n" +" % if event_address:\n" "
\n" " \n" "
\n" +" % endif\n" "
\n" " \n" " \n" @@ -479,8 +535,8 @@ msgid "" "\n" "\n" "\n" -"% if object.company_id\n" "\n" +" % if object.company_id\n" " \n" " \n" "
\n" " Sent by ${object.company_id.name}\n" @@ -490,8 +546,8 @@ msgid "" " % endif\n" "
\n" +" % endif\n" "\n" -"% endif\n" "\n" " " msgstr "" From 45dcd186477e07cc2ca5b051958ddc30078f91b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 27 Jul 2020 15:04:27 +0000 Subject: [PATCH 2/9] [IMP] website: support add_direction in duration qweb widget RATIONALE Events are sometimes held online, gathering a community. In this merge we improve Event application to better support full-online events with improved tracks, wishlists, chat rooms, ... PURPOSE Prepare Event Online support by providing fixes in registration and event frontend flows. Also provide a quick back2basic in backend views to prepare addition of Online sub modules. SPECIFICATIONS Allow to give add_direction to duration widget, propagated to babel formatting. See babel for any information about its use. LINKS Community PR odoo/odoo#55197 Enterprise PR odoo/enterprise#12113 Task ID-2309702 (Event Preparatory Merge 4) Prepares Task ID-2252655 (Main Online Event task) --- odoo/addons/base/models/ir_qweb_fields.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/odoo/addons/base/models/ir_qweb_fields.py b/odoo/addons/base/models/ir_qweb_fields.py index 3caa5c665aa..da6d9f86390 100644 --- a/odoo/addons/base/models/ir_qweb_fields.py +++ b/odoo/addons/base/models/ir_qweb_fields.py @@ -528,6 +528,11 @@ class DurationConverter(models.AbstractModel): description=_("Formatting: long, short, narrow (not used for digital)"), default_value='long' ), + add_direction=dict( + type="boolean", + string=_("Add direction"), + description=_("Add directional information (not used for digital)") + ), ) return options @@ -566,7 +571,12 @@ class DurationConverter(models.AbstractModel): if not v: continue section = babel.dates.format_timedelta( - v*secs_per_unit, format=options.get('format', 'long'), threshold=1, locale=locale) + v*secs_per_unit, + granularity=round_to, + add_direction=options.get('add_direction'), + format=options.get('format', 'long'), + threshold=1, + locale=locale) if section: sections.append(section) From 567bd4d9d937245acbfaa50d7f089dee78b25f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 24 Jun 2020 13:57:08 +0000 Subject: [PATCH 3/9] [REF] website(_event): allow to give a placeholder to website search box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes in registration and event frontend flows. Also provide a quick back2basic in backend views to prepare addition of Online sub modules. SPECIFICATIONS Be more explicit in search boxes: allow to set a placeholder. It helps users understanding purpose of the search tool. Set it to "Search an event ..." in website_event. LINKS Community PR odoo/odoo#55197 Enterprise PR odoo/enterprise#12113 Task ID-2309702 (Event Preparatory Merge 4) Prepares Task ID-2252655 (Main Online Event task) Prepares Task ID-2283796 (Event B2Basics / Registration Flow) Prepares Task ID-2299857 (Event Design Review) Co-Authored-By: Aurélien Warnon Co-Authored-By: David Beguin Co-Authored-By: Thibault Delavallée --- addons/website/views/website_templates.xml | 2 +- addons/website_event/views/event_templates.xml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index 163b811928e..849df56e298 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -1055,7 +1055,7 @@ Sitemap: sitemap.xml - - - - - - - - -