[FIX] calendar: correct event day display in the email
This commit addresses an issue in the email templates where event start days were being displayed incorrectly, particularly for events scheduled at specific times in timezones that experienced day shifts during UTC conversion. The previous implementation did not account for the necessary UTC conversion, leading to misaligned event days in the email content. This commit ensures that event start days are accurately calculated based on the appropriate timezone conversion, providing correct and consistent display of event information in the email templates. opw-3458837 closes odoo/odoo#131967 X-original-commit: 1e1781b6242b7b6be8d5a00b1c5270ae572b09b5 Signed-off-by: Arnaud Joset (arj) <arj@odoo.com> Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
<t t-out="format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format='EEEE', lang_code=object.env.lang) or ''">Tuesday</t>
|
||||
</div>
|
||||
<div style="font-size: 48px; min-height: auto; font-weight: bold; text-align: center; color: #5F5F5F; background-color: #F8F8F8; border: 1px solid #875A7B;">
|
||||
<t t-out="str(object.event_id.start.day) or ''">4</t>
|
||||
<t t-out="format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format='d', lang_code=object.env.lang) or ''">4</t>
|
||||
</div>
|
||||
<div style='font-size: 12px; text-align: center; font-weight: bold; color: #ffffff; background-color: #875A7B;'>
|
||||
<t t-out="format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format='MMMM y', lang_code=object.env.lang) or ''">May 2021</t>
|
||||
@@ -208,7 +208,7 @@
|
||||
<t t-out='format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format="EEEE", lang_code=object.env.lang) or ""'>Tuesday</t>
|
||||
</div>
|
||||
<div style="font-size: 48px; min-height: auto; font-weight: bold; text-align: center; color: #5F5F5F; background-color: #F8F8F8; border: 1px solid #875A7B;">
|
||||
<t t-out="str(object.event_id.start.day) or ''">4</t>
|
||||
<t t-out="format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format='d', lang_code=object.env.lang) or ''">4</t>
|
||||
</div>
|
||||
<div style='font-size: 12px; text-align: center; font-weight: bold; color: #ffffff; background-color: #875A7B;'>
|
||||
<t t-out='format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format="MMMM y", lang_code=object.env.lang) or ""'>May 2021</t>
|
||||
@@ -315,7 +315,7 @@
|
||||
<t t-out='format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format="EEEE", lang_code=object.env.lang) or ""'>Tuesday</t>
|
||||
</div>
|
||||
<div style="font-size: 48px; min-height: auto; font-weight: bold; text-align: center; color: #5F5F5F; background-color: #F8F8F8; border: 1px solid #875A7B;">
|
||||
<t t-out="str(object.event_id.start.day) or ''">4</t>
|
||||
<t t-out="format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format='d', lang_code=object.env.lang) or ''">4</t>
|
||||
</div>
|
||||
<div style='font-size: 12px; text-align: center; font-weight: bold; color: #ffffff; background-color: #875A7B;'>
|
||||
<t t-out='format_datetime(dt=object.event_id.start, tz=object.mail_tz if not object.event_id.allday else None, dt_format="MMMM y", lang_code=object.env.lang) or ""'>May 2021</t>
|
||||
|
||||
Reference in New Issue
Block a user