Skip to content
Snippets Groups Projects
Commit 508f2a9a authored by Thomas Lefebvre (thle)'s avatar Thomas Lefebvre (thle)
Browse files

[FIX] hr_holidays: add employee in the event title of the calendar view


Issue:
In the calendar view of Time Off (Approvals / Time Off),
we see the "display_name" of the events,
but we don't see explicitly the name of the employees
associated with the events.

Solution:
Change the title of the event
by adding the employee's name at the beginning.

opw-3239972

closes odoo/odoo#116942

Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
parent c837ffc4
Branches
Tags
No related merge requests found
......@@ -13,6 +13,18 @@ export class TimeOffCalendarModel extends CalendarModel {
}
}
/**
* @override
*/
normalizeRecord(rawRecord) {
let result = super.normalizeRecord(...arguments);
if (rawRecord.employee_id) {
const employee = rawRecord.employee_id[1];
result.title = [employee, result.title].join(' ');
}
return result;
}
makeContextDefaults(record) {
const { scale } = this.meta;
const context = super.makeContextDefaults(record);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment