-
- Downloads
[IMP] hr_*: Improve employee presence state
Purpose
=======
There are currently multiple ways to determine if an employee is presence
or absent:
- login state (user status on chat)
- checkin/checkout from the Attendance app
- leave
- hr_presence (email, ip)
Those states are displayed in several different places and can be inconsitent.
e.g. Logged in -> green in the chat
Not checked in -> red on the employee kanban view.
The multiple ways to determine employee presence described above
should be aggregated together to have a better consistency.
Specification
=============
There are 3 presence states (previously defined in module `hr_presence`),
namely `present`, `absent`, `to_define`. They are now defined as soon as
`hr` module is installed.
The state computation can have several behaviors according to which apps
are installed:
1. `hr` is installed
Check employee presence based on login by default (only for employees with
a user).
Kanban state (private and public): should be green when logged in, red when logged out and
orange when the user is away.
Private employee form: Display a stat button "Connected" on the form view
when the user is logged in or "Last Activity xx/xx/xxx" otherwise.
2. `hr_attendance` is installed:
when the user is logged out, the state
is determined from the checked in/out state. But when the user is logged in,
consider the user as present (even if he checked out).
Kanban state: green for checked in, red for checked out
Private form view: attendance stat button.
3. `hr_holidays` is installed:
Has the highest priority if the employee is on leave.
Kanban state: red if employee is on leave.
Private form view: stat button "Absent Until xx/xx/xxxx" if employee
is on leave.
4. `hr_presence` is installed:
Two additionnal presence checking option: emails sent and IP address connected.
Once a user sent an email or the IP address was connected, he is considered
present for the entire day.
There should be at most one stat button on the employee form view, with the
relevent information.
Task id: 2024482
closes odoo/odoo#34933
Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
Showing
- addons/hr/data/hr_data.xml 5 additions, 0 deletionsaddons/hr/data/hr_data.xml
- addons/hr/models/__init__.py 1 addition, 0 deletionsaddons/hr/models/__init__.py
- addons/hr/models/hr_employee_base.py 28 additions, 0 deletionsaddons/hr/models/hr_employee_base.py
- addons/hr/models/res_company.py 11 additions, 0 deletionsaddons/hr/models/res_company.py
- addons/hr/models/res_config_settings.py 6 additions, 3 deletionsaddons/hr/models/res_config_settings.py
- addons/hr/models/res_users.py 4 additions, 0 deletionsaddons/hr/models/res_users.py
- addons/hr/views/hr_employee_public_views.xml 10 additions, 0 deletionsaddons/hr/views/hr_employee_public_views.xml
- addons/hr/views/hr_employee_views.xml 37 additions, 4 deletionsaddons/hr/views/hr_employee_views.xml
- addons/hr/views/res_config_settings_views.xml 44 additions, 0 deletionsaddons/hr/views/res_config_settings_views.xml
- addons/hr/views/res_users.xml 22 additions, 0 deletionsaddons/hr/views/res_users.xml
- addons/hr_attendance/models/hr_employee.py 14 additions, 0 deletionsaddons/hr_attendance/models/hr_employee.py
- addons/hr_attendance/views/hr_employee_view.xml 21 additions, 30 deletionsaddons/hr_attendance/views/hr_employee_view.xml
- addons/hr_attendance_presence/__init__.py 0 additions, 1 deletionaddons/hr_attendance_presence/__init__.py
- addons/hr_attendance_presence/__manifest__.py 0 additions, 19 deletionsaddons/hr_attendance_presence/__manifest__.py
- addons/hr_attendance_presence/models/__init__.py 0 additions, 2 deletionsaddons/hr_attendance_presence/models/__init__.py
- addons/hr_attendance_presence/models/hr_employee.py 0 additions, 32 deletionsaddons/hr_attendance_presence/models/hr_employee.py
- addons/hr_attendance_presence/models/res_config_settings.py 0 additions, 9 deletionsaddons/hr_attendance_presence/models/res_config_settings.py
- addons/hr_attendance_presence/views/hr_employee.xml 0 additions, 21 deletionsaddons/hr_attendance_presence/views/hr_employee.xml
- addons/hr_attendance_presence/views/res_config_settings_views.xml 0 additions, 17 deletions...r_attendance_presence/views/res_config_settings_views.xml
- addons/hr_holidays/models/hr_employee.py 5 additions, 0 deletionsaddons/hr_holidays/models/hr_employee.py
addons/hr/models/res_company.py
0 → 100644
Please register or sign in to comment