Repository navigation
[19.0][FIX] hr_employee_calendar_planning, hr_course: employees readable by internal users - #1671
Open
parabol123654 wants to merge 2 commits into
Open
parabol123654 wants to merge 2 commits into
parabol123654 wants to merge 2 commits into
Conversation
Contributor
|
Hi @victoralmau, @pedrobaeza, |
…sers calendar_ids is defined on hr.employee only, without 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 calendar_ids, which you are trying to read, are not available for employee public profiles". Restrict the field to HR officers, as core does for the fields that are not on hr.employee.public. Assisted-by: Claude Opus 5.5
count_courses and courses_ids are defined on hr.employee only, without groups, so a read of all the fields of an employee by a user without HR rights raised "The fields ..., which you are trying to read, are not available for employee public profiles". Restrict them to HR officers. Assisted-by: Claude Opus 5.5
parabol123654
force-pushed
the
19.0-fix-hr-employee-public-read
branch
from
November 14, 2026 18:46
dd7cf80 to
408774e
Compare
victoralmau
suggested changes
Nov 17, 2026
victoralmau
left a comment
Member
There was a problem hiding this comment.
Also add #1667 to avoid errors.
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.
Forward port of #1662 (18.0, merged) for the modules that exist on 19.0.
hr_appraisal_ocais not migrated yet.Users without HR rights read employees through
hr.employee.public. Fields added onhr.employeeonly, without groups, make a read of all the fields of an employee fail for them (read([]),search_readwithout fields):The fix adds
groups="hr.group_hr_user"to these fields:hr_employee_calendar_planning:calendar_ids, as on 18.0. On 19.0 alsostored_is_flexible(onhr.version, so it is inherited byhr.employee), the stored copy of coreis_flexible, which has the same group.hr_course:count_coursesandcourses_ids.Test:
test_read_employees_internal_user(from #1662). An internal user creates its employee and reads it with all fields.AccessErrorabove, and corehrTestSelfAccessProfile.test_employee_fields_groupsfails too.Assisted-by: Claude Opus 5.5