* = website Change the wording of the sms reminder template to make it sound friendlier and more complete. The sms will include the event address if it is defined. Otherwise, it will link to the event page if website is installed. A one line-formatted version of the venue is added to the model to be used in the template and other places. This required to update `event_registration.get_date_range_str` to not include the time when describing an event happening more than a month from the current date, which makes sense as there is no reason to specify the time only in that case, and we add the time somewhere else when it's useful anyway. For consistency, Wembley Stadium is updated to London timezone in the demo data. Task-2777183 closes odoo/odoo#85664 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
20 lines
1.4 KiB
XML
20 lines
1.4 KiB
XML
<?xml version="1.0"?>
|
|
<odoo><data noupdate="1">
|
|
|
|
<record id="sms_template_data_event_registration" model="sms.template">
|
|
<field name="name">Event: Registration</field>
|
|
<field name="model_id" ref="event.model_event_registration"/>
|
|
<field name="body">{{ object.event_id.organizer_id.name or object.event_id.company_id.name or user.env.company.name }}: We are happy to confirm your registration for the {{ object.event_id.name }} event.</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
</record>
|
|
|
|
<record id="sms_template_data_event_reminder" model="sms.template">
|
|
<field name="name">Event: Reminder</field>
|
|
<field name="model_id" ref="event.model_event_registration"/>
|
|
<field name="body">Ready for "{{ object.event_id.name }}" {{ object.get_date_range_str(object.partner_id.lang) }}?
|
|
{{ 'It starts at %s' % format_time(time=object.event_begin_date, tz=object.event_id.date_tz, time_format='short', lang_code=object.partner_id.lang) + (', at %s' % object.event_id.address_inline if object.event_id.address_inline else '') + '.\nSee you there!' if object.event_id.address_inline or 'website_published' not in object.event_id._fields else 'Join us on %s/event/%i !' % (object.get_base_url(), object.event_id.id) }}</field>
|
|
<field name="lang">{{ object.partner_id.lang }}</field>
|
|
</record>
|
|
|
|
</data></odoo>
|