Skip to content
Snippets Groups Projects
Commit f26f2356 authored by Philippe Wauthy's avatar Philippe Wauthy
Browse files

[FIX] hr(_holidays)(_attendance): display the presence bubble


The presence bubble on the employee form is hidden while it is shown on the kanban view of the employees.
This commit fixes the presence bubble to have a consistent behaviour between the employees kanban view and the employee form.

task-2945615

closes odoo/odoo#103779

X-original-commit: 809715958f7165aef328faf99a1d7bc7c81f9329
Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
Signed-off-by: default avatarphwa-odoo <phwa@odoo.com>
parent 9ba78dad
No related branches found
No related tags found
No related merge requests found
......@@ -66,11 +66,11 @@
<h1 class="d-flex">
<field name="name" placeholder="Employee's Name" required="True" style="font-size: min(4vw, 2.6rem);" />
<div class="d-flex align-items-end fs-6" style="height: min(4vw, 2.6rem); padding-bottom: 1px;">
<div id="hr_presence_status" attrs="{'invisible': ['|', ('last_activity', '=', False), ('user_id', '=', False)]}" class="ms-1">
<div id="hr_presence_status" class="ms-1">
<!-- Employee is present/connected and it is normal according to his work schedule -->
<small role="img" class="fa fa-fw fa-circle text-success o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_present')]}" aria-label="Present" title="Present"/>
<!-- Employee is not present and it is normal according to his work schedule -->
<small role="img" class="fa fa-fw fa-circle-o text-muted o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'present_absent')]}" aria-label="Absent" title="Absent" name="presence_absent"/>
<small role="img" class="fa fa-fw fa-circle-o text-muted o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_absent')]}" aria-label="Absent" title="Absent" name="presence_absent"/>
<!-- Employee is connected but according to his work schedule, he should not work for now -->
<small role="img" class="fa fa-fw fa-circle-o text-success o_button_icon hr_presence align-middle" attrs="{'invisible': [('hr_icon_display', '!=', 'presence_absent_active')]}" aria-label="Present but not active" title="Present but not active" name="presence_absent_active"/>
<!-- Employee is not here but according to his work schedule, he should be connected -->
......
......@@ -19,21 +19,16 @@
</field>
</record>
<!-- TODO: remove in master -->
<record id="hr_employee_view_form" model="ir.ui.view">
<field name="name">hr.employee.holidays.attendance.inherit</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr_attendance.view_employee_form_inherit_hr_attendance"/>
<field name="priority" eval="125" />
<field name="arch" type="xml">
<!-- Merge invisible attr of both module -->
<xpath expr="//div[@id='hr_presence_status']" position="attributes">
<attribute name="attrs">
{'invisible': ['|', '|', '|',
('is_absent', '=', True),
('hr_presence_state', '=', 'absent'),
('attendance_state', '=', 'checked_in'),
('id', '=', False),
]}
{'invisible': False}
</attribute>
</xpath>
</field>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment