-
-
Notifications
You must be signed in to change notification settings - Fork 352
[FIX] base_user_role: Cannot see User Roles in list view, even though the user has roles in form view #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,9 +21,9 @@ def _compute_show_alert(self): | |
| for user in self: | ||
| user.show_alert = user.role_line_ids.filtered(lambda rec: rec.is_enabled) | ||
|
|
||
| role_ids = fields.One2many( | ||
| user_role_ids = fields.One2many( | ||
| comodel_name="res.users.role", | ||
| string="User Roles", | ||
| string="Roles", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need to change this. Do you have a good reason for this?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need this change to fix this warning |
||
| compute="_compute_role_ids", | ||
| compute_sudo=True, | ||
| groups="base.group_erp_manager", | ||
|
|
@@ -44,7 +44,7 @@ def _default_role_lines(self): | |
| @api.depends("role_line_ids.role_id") | ||
| def _compute_role_ids(self): | ||
| for user in self: | ||
| user.role_ids = user.role_line_ids.mapped("role_id") | ||
| user.user_role_ids = user.role_line_ids.mapped("role_id") | ||
|
|
||
| @api.model_create_multi | ||
| def create(self, vals_list): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a migration script needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because the field is a computed non-store field