-
- Downloads
[MERGE] hr*: Introduce the public employee profile
Purpose
=======
1/ Robustness & security: right now it is not easy to understand and do something
clean in term of security (hr people vs employees, private info vs public). A
HR officer doesn't know if he can write something on the chatter. Currently, a
note will be visible for all the employees who have access to the employee form
view for example.
2/ In term of business, it makes sense to let a hr manages payroll stuff (contract,
employees private information, ... and other employee see public information
(résumé and work information)
Specification
=============
Introduce 2 new models:
- hr.employee.base (AbstractModel): This represents the basic skeleton
model on which the shared fields and methods between the public and
the private employees models.
- hr.employee.public (_auto=False): This is a sql view based on the
employee values, readable for an internal user (i.e. an employee).
The model hr.employee is not readable anymore for an employee.
There are now 3 ways to access the employee data:
1/ From the hr.employee views. HR officer access rights are required
2/ From the public profile. The public data for an employee are accessible
but can't be modified.
3/ From the 'My Profile' menu. A classic employee can access its own
data from there, and can modify them.
TaskID: 1961151
closes odoo/odoo#33725
Signed-off-by:
Yannick Tivisse (yti) <yti@odoo.com>
No related branches found
No related tags found
Showing
- addons/hr/__manifest__.py 6 additions, 0 deletionsaddons/hr/__manifest__.py
- addons/hr/models/__init__.py 8 additions, 3 deletionsaddons/hr/models/__init__.py
- addons/hr/models/hr_department.py 84 additions, 0 deletionsaddons/hr/models/hr_department.py
- addons/hr/models/hr_employee.py 84 additions, 192 deletionsaddons/hr/models/hr_employee.py
- addons/hr/models/hr_employee_base.py 25 additions, 0 deletionsaddons/hr/models/hr_employee_base.py
- addons/hr/models/hr_employee_category.py 18 additions, 0 deletionsaddons/hr/models/hr_employee_category.py
- addons/hr/models/hr_employee_public.py 59 additions, 0 deletionsaddons/hr/models/hr_employee_public.py
- addons/hr/models/hr_job.py 71 additions, 0 deletionsaddons/hr/models/hr_job.py
- addons/hr/security/hr_security.xml 7 additions, 0 deletionsaddons/hr/security/hr_security.xml
- addons/hr/security/ir.model.access.csv 2 additions, 1 deletionaddons/hr/security/ir.model.access.csv
- addons/hr/tests/test_self_user_access.py 11 additions, 14 deletionsaddons/hr/tests/test_self_user_access.py
- addons/hr/views/hr_department_views.xml 139 additions, 0 deletionsaddons/hr/views/hr_department_views.xml
- addons/hr/views/hr_employee_category_views.xml 38 additions, 0 deletionsaddons/hr/views/hr_employee_category_views.xml
- addons/hr/views/hr_employee_public_views.xml 151 additions, 0 deletionsaddons/hr/views/hr_employee_public_views.xml
- addons/hr/views/hr_employee_views.xml 360 additions, 0 deletionsaddons/hr/views/hr_employee_views.xml
- addons/hr/views/hr_job_views.xml 121 additions, 0 deletionsaddons/hr/views/hr_job_views.xml
- addons/hr/views/hr_plan_views.xml 103 additions, 0 deletionsaddons/hr/views/hr_plan_views.xml
- addons/hr/views/hr_views.xml 70 additions, 812 deletionsaddons/hr/views/hr_views.xml
- addons/hr/views/res_users.xml 11 additions, 0 deletionsaddons/hr/views/res_users.xml
- addons/hr_attendance/models/hr_employee.py 26 additions, 25 deletionsaddons/hr_attendance/models/hr_employee.py
Loading
Please register or sign in to comment