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 intoOCA: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 intoOCA: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:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants