diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-10-21 15:22:36 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-10-21 15:22:36 +0200 |
| commit | de987831da237ed5f9c96d50a9e51d083e072aa0 (patch) | |
| tree | ef714d2d98693eae3446620d28bb48314573018a /addons/document | |
| parent | ea2a976f31b2611b6b4ff69f4a5cdc2ffc7798fe (diff) | |
| parent | d70518d04f8f8061c8c683ea4ba8c95ae631ae45 (diff) | |
[MERGE] forward port branch 11.0 up to d70518d04f8
Diffstat (limited to 'addons/document')
| -rw-r--r-- | addons/document/static/src/js/document.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/document/static/src/js/document.js b/addons/document/static/src/js/document.js index 5fc69141583..0af85179b49 100644 --- a/addons/document/static/src/js/document.js +++ b/addons/document/static/src/js/document.js @@ -5,6 +5,7 @@ var core = require('web.core'); var Dialog = require('web.Dialog'); var framework = require('web.framework'); var Sidebar = require('web.Sidebar'); +var field_utils = require('web.field_utils'); var _t = core._t; @@ -61,6 +62,7 @@ Sidebar.include({ */ _processAttachments: function (attachments) { //to display number in name if more then one attachment which has same name. + var self = this; _.chain(attachments) .groupBy(function (attachment) { return attachment.name; }) .each(function (attachment) { @@ -75,6 +77,10 @@ Sidebar.include({ if (a.type === "binary") { a.url = '/web/content/' + a.id + '?download=true'; } + a.create_date = field_utils.parse.datetime(a.create_date, 'create_date', {isUTC: true}); + a.create_date_string = field_utils.format.datetime(a.create_date, 'create_date', self.env.context.params); + a.write_date = field_utils.parse.datetime(a.write_date, 'write_date', {isUTC: true}); + a.write_date_string = field_utils.format.datetime(a.write_date, 'write_date', self.env.context.params); }); this.items.files = attachments; }, |
