Skip to content

[18.0][IMP] sale_planner_calendar: allow sales managers to edit non-private events#4390

Open
CarlosRoca13 wants to merge 1 commit into
OCA:18.0from
Tecnativa:18.0-IMP-sale_planner_calendar
Open

[18.0][IMP] sale_planner_calendar: allow sales managers to edit non-private events#4390
CarlosRoca13 wants to merge 1 commit into
OCA:18.0from
Tecnativa:18.0-IMP-sale_planner_calendar

Conversation

@CarlosRoca13
Copy link
Copy Markdown
Contributor

Override _compute_user_can_edit so users in the group_sale_manager group can edit any event that is not marked as private, in addition to the default editability rules.

cc @Tecnativa TT62811

ping @carlosdauden @sergio-teruel

@OCA-git-bot OCA-git-bot added series:18.0 mod:sale_planner_calendar Module sale_planner_calendar labels Jun 8, 2026
… events

Override _compute_user_can_edit so users in the group_sale_manager group can edit any event that is not marked as private, in addition to the default editability rules.
@CarlosRoca13 CarlosRoca13 force-pushed the 18.0-IMP-sale_planner_calendar branch from 196bb31 to a47dc4a Compare June 8, 2026 14:44
if (
self.env.context.get("force_user_can_edit_event")
and self.env.user.has_group("sales_team.group_sale_manager")
and event.target_partner_id
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.

Set this as first condition.
We must order from high to low performance conditions

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

Labels

mod:sale_planner_calendar Module sale_planner_calendar series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants