Skip to content

Commit

Permalink
[FIX] hr,hr_holidays: show icon even if employee has no user linked
Browse files Browse the repository at this point in the history
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#138803
  • Loading branch information
xavierbol committed Oct 18, 2023
1 parent d149b8a commit 1c993ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion addons/hr/views/hr_employee_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
3 changes: 0 additions & 3 deletions addons/hr_holidays/views/hr_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 1c993ea

Please sign in to comment.