Skip to content

Conversation

@StefanRijnhart
Copy link
Member

@StefanRijnhart StefanRijnhart commented Nov 20, 2025

When creating activity plans, instead of assigning an activity to a user, there is also the option to assign it to a team instead.

@StefanRijnhart StefanRijnhart force-pushed the 18.0-mail_activity_team-imp-configure_plan_templates_for_teams branch from 2cad8e5 to 2baa893 Compare December 2, 2025 07:26
Copy link
Contributor

@CRogos CRogos left a comment

Choose a reason for hiding this comment

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

Basically the change is working.

In the normal Activity view, you can select a team_id and a team_user_id, this is missing in the plan dialog.
image

image

Not sure if we need a dedicated variable team_user_id in "mail.activity.plan.template" like in "mail.activity" or if we just should set the user_id field?

There is also room for more test coverage ;)

@StefanRijnhart StefanRijnhart changed the title [18.0[IMP] mail_activity_team: assign plan activities to teams [18.0][IMP] mail_activity_team: assign plan activities to teams Dec 2, 2025
@StefanRijnhart
Copy link
Member Author

@CRogos thanks for the review! I've added a fixup-commit that improves UI consistency and test coverage. If you agree I will squash the commits.

Copy link
Contributor

@CRogos CRogos left a comment

Choose a reason for hiding this comment

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

I agree with most of the changes, but I would change the UI behavior the same as it is here for "Default User". Maybe we can change the display name of this value to "Default User/Team"?

image

Copy link
Contributor

@CRogos CRogos left a comment

Choose a reason for hiding this comment

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

Code + Function LGTM, but I am still not convinced by the "Assignment: Team" option, because a lot of code wouldn't be necessary if we remove it. (e.g. activity_team_required)

I've added one more improvement suggestion.

Comment on lines +48 to +53
for field in ("team_id", "team_user_id", "user_id"):
if self.env.context.get(f"schedule_default_{field}") and not act_values.get(
field
):
act_values[field] = self.env.context[f"schedule_default_{field}"]

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the schedule_default_team_id be selectable here when Assignemnt is set to "ask at launch":

image

Copy link
Member Author

Choose a reason for hiding this comment

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

That could be a future addition, but it is out of scope for us at this point.

@StefanRijnhart StefanRijnhart force-pushed the 18.0-mail_activity_team-imp-configure_plan_templates_for_teams branch from ae851ec to f503093 Compare December 8, 2025 11:33
@StefanRijnhart StefanRijnhart force-pushed the 18.0-mail_activity_team-imp-configure_plan_templates_for_teams branch from f503093 to ba918bc Compare December 8, 2025 11:34
@StefanRijnhart
Copy link
Member Author

Commits squashed.

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