Skip to content

[16.0] [FIX] web_field_tooltip: make tooltip_show_add_helper_allowed self-readable - #3624

Open
SuShanVoong wants to merge 1 commit into
OCA:16.0from
factorlibre:16.0-fix-web_field_tooltip
Open

[16.0] [FIX] web_field_tooltip: make tooltip_show_add_helper_allowed self-readable#3624
SuShanVoong wants to merge 1 commit into
OCA:16.0from
factorlibre:16.0-fix-web_field_tooltip

Conversation

@SuShanVoong

Copy link
Copy Markdown

Description

web_field_tooltip adds the computed field tooltip_show_add_helper_allowed to res.users and displays it on the user form, but only tooltip_show_add_helper is registered in SELF_READABLE_FIELDS.

When the hr module is also installed, an internal user without hr.group_hr_user who opens their own Preferences gets an AccessError ("Access Denied") popup. The web client reads the whole user form in a single read() call that now includes tooltip_show_add_helper_allowed; because that field is not self-readable, the res.users self-read exemption no longer applies to the call, and the HR fields that hr adds with groups="hr.group_hr_user" raise AccessError.

Steps to reproduce (runboat)

  1. Install web_field_tooltip and hr.
  2. Log in as an internal user that is not in hr.group_hr_user.
  3. Open the user menu → Preferences. → AccessError popup.

FL-703-1158

…adable

The module adds the computed field `tooltip_show_add_helper_allowed` on
res.users and displays it on the user form, but only registers
`tooltip_show_add_helper` in the self-readable fields.

When a user without `hr.group_hr_user` opens their own Preferences, the web
client reads the full user form, which now includes
`tooltip_show_add_helper_allowed`. Because that field was not part of
`SELF_READABLE_FIELDS`, the res.users self-read exemption
(base/models/res_users.py) no longer applied to the whole read, so every
group-restricted field requested in the same call (e.g. the HR fields added
by the `hr` module) raised an AccessError and the user got an "Access Denied"
popup.

Add `tooltip_show_add_helper_allowed` to `SELF_READABLE_FIELDS` (read only;
it stays out of the writeable set since it is computed).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@SuShanVoong

SuShanVoong commented Jul 27, 2026

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:web_field_tooltip Module web_field_tooltip series:16.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants