[FIX] calendar, mail: Use user supplied date format in the activity overview

Ticket: 2578903

In the overview menu, the time of a calendar event was not formatted according to the user preferences. This PR fixes that.

closes odoo/odoo#75039

X-original-commit: 0f9746adab26a792fba5d9cfe8e30ea90d7c2a67
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
Signed-off-by: Hubert Van De Walle <hubvd@users.noreply.github.com>
This commit is contained in:
Hubert (huvw)
2021-08-12 14:21:53 +00:00
committed by Hubert Van de Walle (huvw)
parent b44345dd8d
commit 6b9592d43a
2 changed files with 4 additions and 2 deletions
@@ -32,7 +32,7 @@
<t t-if="meeting.allday">All Day</t>
<t t-else=''>
<t t-set="is_next_meeting" t-value="false"/>
<t t-esc="moment(meeting.start).local().format('hh:mm A')"/>
<t t-esc="moment(meeting.start).local().format(Time.strftime_to_moment_format(_t.database.parameters.time_format))"/>
</t>
</span>
</div>
@@ -4,6 +4,7 @@ import { qweb as QWeb } from 'web.core';
import session from 'web.session';
import SystrayMenu from 'web.SystrayMenu';
import Widget from 'web.Widget';
import Time from 'web.time';
const { Component } = owl;
@@ -78,7 +79,8 @@ var ActivityMenu = Widget.extend({
var self = this;
self._getActivityData().then(function (){
self._$activitiesPreview.html(QWeb.render('mail.systray.ActivityMenu.Previews', {
widget: self
widget: self,
Time: Time
}));
});
},