Repository navigation
[18.0][FIX] hr_appraisal_oca: read public employee profiles - #1670
Open
parabol123654 wants to merge 1 commit into
Open
parabol123654 wants to merge 1 commit into
parabol123654 wants to merge 1 commit into
Conversation
Contributor
|
Hi @ebauza, @pedrobaeza, |
parabol123654
force-pushed
the
18.0-fix-hr_appraisal_oca-public-employee
branch
from
November 12, 2026 17:41
8c2e6e1 to
58fc466
Compare
pedrobaeza
approved these changes
Nov 12, 2026
can_open_last_appraisal is defined on hr.employee.base, so it is also computed for hr.employee.public, but its compute read allowed_user_ids, which only exists on hr.employee: reading the public profiles with all their fields raised an AttributeError. Read the allowed users on the hr.employee record of the same id. Fixes OCA#1669 Assisted-by: Claude Opus 5.5
parabol123654
force-pushed
the
18.0-fix-hr_appraisal_oca-public-employee
branch
from
November 14, 2026 18:46
58fc466 to
67565b0
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 #1669.
can_open_last_appraisalis defined onhr.employee.base, so it is also computed forhr.employee.public. Its compute readsemployee.sudo().allowed_user_ids, which only exists onhr.employee. Reading the public profiles with all their fields therefore raises:The fix reads the allowed users on the
hr.employeerecord of the same id (public profiles share the ids of the employees), as superuser, like the compute already did since #1662.Test:
test_read_public_employeesreads the public profiles with all fields as an internal user.AttributeErrorabove.Assisted-by: Claude Opus 5.5