[FIX] hr,hr_holidays: show icon even if employee has no user linked

Before this commit, in the form view of employee, the presence status
icon displayed in the top right of the avatar image is hidden if there
is no last activity or no user linked to the employee.

This commit changes the visibility condition to have the same
visibility condition defined in the kanban view for the same icon.

task-3556262

Part-of: odoo/odoo#138803
This commit is contained in:
Xavier Bol (xbo)
2023-10-18 15:26:33 +00:00
parent d149b8add6
commit 1c993ea34e
2 changed files with 2 additions and 4 deletions
+2 -1
View File
@@ -79,7 +79,8 @@
</div>
<div class="o_employee_avatar m-0 p-0">
<field name="image_1920" widget='image' class="oe_avatar m-0" options='{"zoom": true, "preview_image":"avatar_128"}'/>
<field name="hr_icon_display" class="d-flex align-items-end fs-6 o_employee_availability" widget="hr_presence_status"/>
<field name="show_hr_icon_display" invisible="1" />
<field name="hr_icon_display" class="d-flex align-items-end fs-6 o_employee_availability" invisible="not show_hr_icon_display or not id" widget="hr_presence_status"/>
</div>
</div>
<group>
-3
View File
@@ -119,9 +119,6 @@
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name = "priority" eval="20" />
<field name="arch" type="xml">
<xpath expr="//field[@name='hr_icon_display']" position="attributes">
<attribute name="invisible">not last_activity or not id</attribute>
</xpath>
<xpath expr="//group[@name='managers']" position="inside">
<field name="leave_manager_id" widget="many2one_avatar_user"/>
</xpath>