From 87fd20c9b4d9b827af56622e0b4efc63507bcd8d Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Mon, 23 May 2022 11:33:28 +0000 Subject: [PATCH] [FIX] web: show datetime localized in Metadata view from debug menu Before this commit, the dialog 'View Metadata' open the date in utc since the refactoring of Owl. It is not coherent with all others dates shown in form. Now we show the date in the timezone of the current user. Part-of: odoo/odoo#92108 --- addons/web/static/src/legacy/debug_manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/legacy/debug_manager.js b/addons/web/static/src/legacy/debug_manager.js index 82fc4919b8e..c0b4a89b894 100644 --- a/addons/web/static/src/legacy/debug_manager.js +++ b/addons/web/static/src/legacy/debug_manager.js @@ -61,8 +61,8 @@ class GetMetadataDialog extends Component { this.state.creator = formatMany2one(metadata.create_uid); this.state.lastModifiedBy = formatMany2one(metadata.write_uid); this.state.noupdate = metadata.noupdate; - this.state.create_date = formatDateTime(parseDateTime(metadata.create_date)); - this.state.write_date = formatDateTime(parseDateTime(metadata.write_date)); + this.state.create_date = formatDateTime(parseDateTime(metadata.create_date), { timezone: true }); + this.state.write_date = formatDateTime(parseDateTime(metadata.write_date), { timezone: true }); } } GetMetadataDialog.template = "web.DebugMenu.GetMetadataDialog";