Skip to content

[18.0][FIX] base_user_role: remove active field from res.users.role.line - #444

Open
kanda999 wants to merge 1 commit into
OCA:18.0from
qrtl:18.0-remove-active-field-role-line
Open

[18.0][FIX] base_user_role: remove active field from res.users.role.line#444
kanda999 wants to merge 1 commit into
OCA:18.0from
qrtl:18.0-remove-active-field-role-line

Conversation

@kanda999

Copy link
Copy Markdown

The active field was added in PR #167 to exclude archived users from the role list view count. However, it causes Odoo's active_test filtering to silently hide role lines of archived users from the role form view, making it impossible to audit role assignments.

Replace it with a domain on line_ids to filter archived users without the active_test side effect.

@qrtl QT6433

The `active` field was added in PR OCA#167 to exclude archived users
from the role list view count. However, it causes Odoo's
active_test filtering to silently hide role lines of archived
users from the role form view, making it impossible to audit
role assignments.

Replace it with a domain on `line_ids` to filter archived users
without the active_test side effect.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @jcdrubay, @novawish, @sebalix,
some modules you are maintaining are being modified, check this out!

_name = "res.users.role.line"
_description = "Users associated to a role"

active = fields.Boolean(related="user_id.active")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this filtering?

for role_line in default_user.with_context(active_test=False).role_line_ids:

@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants