[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
This commit is contained in:
Jeremy Kersten
2022-05-24 12:48:01 +02:00
parent df4782164f
commit 87fd20c9b4
@@ -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";