From 1f77fedbbfadd0a478250f8eefba1ac46b0068fa Mon Sep 17 00:00:00 2001 From: "Xavier Bol (xbo)" Date: Mon, 16 Oct 2023 12:49:48 +0200 Subject: [PATCH] [FIX] hr_holidays: fix hr_presence_status widget Before this commit, when the employee is off (because he is on leave) then the presence status icon displayed in org chart, kanban and form view should be `fa-plan`. It is not the case because `fa-circle` is also added by mistake. This commit changes the patch made in `hr_holidays` module to correctly replace the icon by the `fa-plane` when the employee is on leave. task-3556262 Part-of: odoo/odoo#138803 --- .../components/hr_presence_status/hr_presence_status.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/addons/hr_holidays/static/src/components/hr_presence_status/hr_presence_status.js b/addons/hr_holidays/static/src/components/hr_presence_status/hr_presence_status.js index ae4e86ef2ac..ba21d43b54f 100644 --- a/addons/hr_holidays/static/src/components/hr_presence_status/hr_presence_status.js +++ b/addons/hr_holidays/static/src/components/hr_presence_status/hr_presence_status.js @@ -5,12 +5,11 @@ import { patch } from "@web/core/utils/patch"; import { HrPresenceStatus } from "@hr/components/hr_presence_status/hr_presence_status"; patch(HrPresenceStatus.prototype, { - get classNames() { - const classNames = super.classNames; + get icon() { if (this.value.startsWith("presence_holiday")) { - return `${classNames} fa-plane`; + return "fa-plane"; } - return classNames; + return super.icon; }, get color() {