diff options
| author | Alexandre Kühn <aku@odoo.com> | 2017-12-04 11:01:36 +0100 |
|---|---|---|
| committer | Alexandre Kühn <aku@odoo.com> | 2017-12-05 09:13:31 +0100 |
| commit | 6cc5a9963b3cce5d6ddf2cd038def5fe21f17af7 (patch) | |
| tree | 31ec78e726c4965485bfa875c7374678f8f548dc /addons/mail/static/src/xml/activity.xml | |
| parent | 59729695680b33a1eec8e170777e07ee12cb3925 (diff) | |
[FIX] web,*: time format from user's language
Before this fix, the chatter always showed dates of messages in military time format.
This was not the expected behavior, as the user could have had customize
the date and time format in the settings of the current language.
Steps to reproduce the issue:
1. Set Odoo in English
2. Settings > Translations > Languages > English
2.1. Set Date Format to %m/%d/%Y
2.2. Set Time Format to %I:%M:%S %p
3. CRM > (Select any opportunity with at least one message) > Mouse hover on elapsed time (e.g. "an hour ago")
Expected:
- It shows the customized time format (e.g. 11/07/2017 5:33:36 PM)
Results:
- It shows the military time format (e.g. Tue Nov 07 2017 17:33:36 GMT+0100)
opw-781647
Diffstat (limited to 'addons/mail/static/src/xml/activity.xml')
| -rw-r--r-- | addons/mail/static/src/xml/activity.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/static/src/xml/activity.xml b/addons/mail/static/src/xml/activity.xml index 2b0316ad59f..83dc4295e73 100644 --- a/addons/mail/static/src/xml/activity.xml +++ b/addons/mail/static/src/xml/activity.xml @@ -40,13 +40,13 @@ </dd> <dt>Created on</dt> <dd class="mb8"> - <t t-esc="moment(activity.create_date)"/> + <t t-esc="activity.create_date.format(date_format)"/> </dd> <dt>Assigned to</dt> <dd class="mb8"> <img t-attf-src="/web/image#{activity.user_id[0] >= 0 ? ('/res.users/' + activity.user_id[0] + '/image_small') : ''}" height="18" width="18" class="img-circle mr4" t-att-title="activity.create_uid[1]"/> <b><t t-esc="activity.user_id[1]"/></b> - <em>, due on </em><span t-attf-class="o_activity_color_#{activity.state}"><t t-esc="moment(activity.date_deadline)"/></span> + <em>, due on </em><span t-attf-class="o_activity_color_#{activity.state}"><t t-esc="activity.date_deadline.format(date_format)"/></span> </dd> </dl> </div> |
