Repository navigation
[18.0][FIX] hr modules: employees readable by internal users (fields without groups) - #1666
Open
parabol123654 wants to merge 6 commits into
Open
parabol123654 wants to merge 6 commits into
parabol123654 wants to merge 6 commits into
Conversation
The fields this module adds on hr.employee are not on hr.employee.public and had no groups. Users without HR rights read employees through hr.employee.public, so a read of all the fields of an employee (read([]), search_read without fields, e.g. from an API client) raised "The fields ..., which you are trying to read, are not available for employee public profiles". Restrict them to HR officers, as core does for such fields. Assisted-by: Claude Opus 5.5
… users The fields this module adds on hr.employee are not on hr.employee.public and had no groups. Users without HR rights read employees through hr.employee.public, so a read of all the fields of an employee (read([]), search_read without fields, e.g. from an API client) raised "The fields ..., which you are trying to read, are not available for employee public profiles". Restrict them to HR officers, as core does for such fields. Assisted-by: Claude Opus 5.5
The fields this module adds on hr.employee are not on hr.employee.public and had no groups. Users without HR rights read employees through hr.employee.public, so a read of all the fields of an employee (read([]), search_read without fields, e.g. from an API client) raised "The fields ..., which you are trying to read, are not available for employee public profiles". Restrict them to HR officers, as core does for such fields. Assisted-by: Claude Opus 5.5
The fields this module adds on hr.employee are not on hr.employee.public and had no groups. Users without HR rights read employees through hr.employee.public, so a read of all the fields of an employee (read([]), search_read without fields, e.g. from an API client) raised "The fields ..., which you are trying to read, are not available for employee public profiles". Restrict them to HR officers, as core does for such fields. Assisted-by: Claude Opus 5.5
The fields this module adds on hr.employee are not on hr.employee.public and had no groups. Users without HR rights read employees through hr.employee.public, so a read of all the fields of an employee (read([]), search_read without fields, e.g. from an API client) raised "The fields ..., which you are trying to read, are not available for employee public profiles". Restrict them to HR officers, as core does for such fields. Assisted-by: Claude Opus 5.5
…sers The fields this module adds on hr.employee are not on hr.employee.public and had no groups. Users without HR rights read employees through hr.employee.public, so a read of all the fields of an employee (read([]), search_read without fields, e.g. from an API client) raised "The fields ..., which you are trying to read, are not available for employee public profiles". Restrict them to HR officers, as core does for such fields. Assisted-by: Claude Opus 5.5
parabol123654
force-pushed
the
18.0-fix-hr-employee-fields-groups
branch
from
November 14, 2026 18:44
c4abd32 to
4963f5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1665. This is the follow-up of #1662 (approved), which does the same for
hr_employee_calendar_planning,hr_appraisal_ocaandhr_course.There is one commit per module. Each commit adds
groups="hr.group_hr_user"to the fields its module adds onhr.employee, which are not onhr.employee.public:hr_employee_language:language_idshr_employee_medical_examination:medical_examination_ids,medical_examination_count,can_see_examinations_buttonhr_employee_relative:relative_idshr_employee_service:service_termination_datehr_employee_service_contract:first_contract_id,last_contract_idhr_personal_equipment_request:equipment_request_ids,personal_equipment_ids,equipment_request_count,personal_equipment_countAll these fields are only used in
hr.view_employee_form, which only HR officers open, so nobody loses anything. The stat buttons whoseinvisibledepends on these fields get the same group. This avoids the "Access Rights Inconsistency" view warning that the CI turns into an error.Tests: each module gets
test_read_own_employee_internal_user. An internal user reads its own employee with the fields of the module it may access, asread([])does. The test only looks at the fields of its own module, so it does not depend on the other modules of the repo.AccessError: ... not available for employee public profiles.TestSelfAccessProfile.test_employee_fields_groupspasses with the whole repo installed. The only other corehrerror isTestChannel, fixed in [18.0][FIX] hr_employee_firstname: create an employee from a user #1664.Assisted-by: Claude Opus 5.5