diff options
| author | Thibault Delavallée <tde@odoo.com> | 2019-04-03 13:35:21 +0000 |
|---|---|---|
| committer | jem-odoo <jem@openerp.com> | 2019-06-28 06:51:16 +0000 |
| commit | ef7871826edce400884fe032366781f59aafd8a6 (patch) | |
| tree | b1e6e32bb860aa2bdecf5d21d82c91a4545b9997 /addons/website_slides/data/mail_data.xml | |
| parent | f17655dd773096f2d37ece392dfe980ae4795819 (diff) | |
[REF] mail: template: move formatting to tools
This commit moves formatting helpers method used in mail.template to tools. The goal
is to reuse them anywhere in odoo, and not only in mail templates. Thoses method are
used to format date, datetime, amount, ... according to user localization (currency,
language, pattern, ...).
This commit also improve the formatting methods of 'date' and 'datetime': we are now
taking the 'lang_code' into account. Indeed, as the implementation uses `babel` lib,
it is easy and usefull to add the language option, to display the given dates into a
particular language. This parameter is optional to keep compatiblity with existing
code.
Task-2025396
Code Courtesy of @tde-banana-odoo
Diffstat (limited to 'addons/website_slides/data/mail_data.xml')
| -rw-r--r-- | addons/website_slides/data/mail_data.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website_slides/data/mail_data.xml b/addons/website_slides/data/mail_data.xml index 246fec87e28..2cf45c4e0c5 100644 --- a/addons/website_slides/data/mail_data.xml +++ b/addons/website_slides/data/mail_data.xml @@ -9,7 +9,7 @@ <div style="margin: 0px; padding: 0px;"> <p style="margin: 0px; padding: 0px; font-size: 13px;"> Hello<br/><br/> - A new ${object.slide_type} <strong>${object.name}</strong> has been published on ${object.channel_id.name} at ${format_tz(object.write_date, tz=user.tz)} + A new ${object.slide_type} <strong>${object.name}</strong> has been published on ${object.channel_id.name} at ${format_datetime(object.write_date, tz=user.tz)} <div style="margin: 16px 8px 16px 8px; text-align: center;"> <a href="${object.website_url}"> <img alt="${object.name}" src="${ctx['base_url']}/web/image/slide.slide/${object.id}/image" style="height:auto; width:150px; margin: 16px;"/> |
