Skip to content

[18.0][ADD] base_user_role_export - #9

Open
prayagrk wants to merge 2 commits into
CITOpenRep:18.0from
prayagrk:18.0-add-base_user_role_export
Open

prayagrk wants to merge 2 commits into
CITOpenRep:18.0from
prayagrk:18.0-add-base_user_role_export

Conversation

@prayagrk

@prayagrk prayagrk commented Sep 2, 2026

Copy link
Copy Markdown

No description provided.

if not target_model or tree.tag not in ("list", "kanban"):
return tree

group_ids = tuple(self.env.user.with_context(role=True)._get_group_ids())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

group_ids = self.env.user._get_group_ids()

if not roles:
return super().fetch_export_models()

role_group_ids = tuple(roles.mapped("group_id").ids)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

role_group_ids = tuple(self.env.user._get_group_ids())

- the user has the ``bypass_role_policy`` flag set, or
- the user has no enabled roles.
"""
if self.env.user.bypass_role_policy:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if self.env.user.bypass_role_policy or not self.env.user._get_enabled_roles():

@prayagrk
prayagrk force-pushed the 18.0-add-base_user_role_export branch from 352381a to b352fa3 Compare September 23, 2026 10:40
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.

2 participants