[18.0][IMP] hr_timesheet_sheet: add configurable approver field - #945
Open
smorita7749 wants to merge 2 commits into
Open
[18.0][IMP] hr_timesheet_sheet: add configurable approver field#945smorita7749 wants to merge 2 commits into
smorita7749 wants to merge 2 commits into
Conversation
Add a company setting that points to a res.users field on hr.employee. The user set in that field for an employee can review the employee's timesheet sheets, in addition to the users granted by the review policy. The field is referenced dynamically by name, so fields added by other modules can be used without depending on them. task-6883
smorita7749
force-pushed
the
18.0-imp-hr_timesheet_sheet
branch
from
July 22, 2026 03:24
4dca13a to
fb95436
Compare
AungKoKoLin1997
left a comment
Contributor
There was a problem hiding this comment.
Please update the readme as necessary.
Read the configured employee field directly in _get_possible_reviewers() instead of exposing it through a computed approver_id field on the sheet. The field was not needed for the feature. Since the employee field name is chosen at runtime, it cannot be declared in @api.depends, so the field could not be stored without going stale, and showing a single approver on the form was misleading: the users allowed by the review policy may review the sheet as well. Document the new setting in readme/CONFIGURE.md.
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.
The improvement adds a configurable approver field to add approvers in addition to the groups.
@qrtl QT6883