Skip to content

[18.0][ADD] base_action_manager - #2

Open
prayagrk wants to merge 1 commit into
CITOpenRep:18.0from
prayagrk:18.0-add-base_action_manager
Open

prayagrk wants to merge 1 commit into
CITOpenRep:18.0from
prayagrk:18.0-add-base_action_manager

Conversation

@prayagrk

Copy link
Copy Markdown

No description provided.

@prayagrk
prayagrk force-pushed the 18.0-add-base_action_manager branch 2 times, most recently from df10118 to 6e97ca1 Compare September 24, 2026 07:41
@prayagrk
prayagrk force-pushed the 18.0-add-base_action_manager branch from 6e97ca1 to 98fa7a2 Compare October 7, 2026 09:09
action_type = action_sudo.type
user_groups = self.env.user.sudo().groups_id
if action_type == "ir.actions.act_window":
return action_sudo.id in user_groups.restricted_window_action_ids.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.

use user_groups.mapped("restricted_window_action_ids").ids

if action_type == "ir.actions.act_window":
return action_sudo.id in user_groups.restricted_window_action_ids.ids
if action_type == "ir.actions.server":
return action_sudo.id in user_groups.restricted_server_action_ids.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.

use user_groups.mapped("restricted_server_action_ids").ids

return action_sudo.id in user_groups.restricted_server_action_ids.ids

return (
action_sudo.id in user_groups.restricted_window_action_ids.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.

Here as well use mapped

@prayagrk
prayagrk force-pushed the 18.0-add-base_action_manager branch from 98fa7a2 to b79c7db Compare October 9, 2026 09:04
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