diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-06-26 13:00:18 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-06-26 13:00:18 +0200 |
| commit | 3bac72ba74163a1ad9d5862f96e7de817aa08918 (patch) | |
| tree | 03497631e494dcaaa8e40a7bc90382e2f740006f /addons/mail/static/src/js/chat_manager.js | |
| parent | 75f93a9cfed17a64cd68a2009c58b75a42183fcf (diff) | |
| parent | aaadb232b23165346f068c82e824e47ea37535d1 (diff) | |
[MERGE] forward port branch 10.0 up to aaadb232b23
Diffstat (limited to 'addons/mail/static/src/js/chat_manager.js')
| -rw-r--r-- | addons/mail/static/src/js/chat_manager.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js index 9f345d2ab8c..a7447657742 100644 --- a/addons/mail/static/src/js/chat_manager.js +++ b/addons/mail/static/src/js/chat_manager.js @@ -221,14 +221,22 @@ function make_message (data) { // can not be done in preprocess, since it alter the original value if (msg.tracking_value_ids && msg.tracking_value_ids.length) { _.each(msg.tracking_value_ids, function(f) { - if (_.contains(['date', 'datetime'], f.field_type)) { - var format = (f.field_type === 'date') ? 'LL' : 'LLL'; + if (f.field_type === 'datetime') { + var format = 'LLL'; if (f.old_value) { f.old_value = moment.utc(f.old_value).local().format(format); } if (f.new_value) { f.new_value = moment.utc(f.new_value).local().format(format); } + } else if (f.field_type === 'date') { + var format = 'LL'; + if (f.old_value) { + f.old_value = moment(f.old_value).local().format(format); + } + if (f.new_value) { + f.new_value = moment(f.new_value).local().format(format); + } } }); } |
