-
-
Notifications
You must be signed in to change notification settings - Fork 104
[18.0][IMP] mail_activity_team: assign plan activities to teams #116
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: 18.0
Are you sure you want to change the base?
[18.0][IMP] mail_activity_team: assign plan activities to teams #116
Conversation
2cad8e5 to
2baa893
Compare
CRogos
left a comment
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.
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.

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 ;)
|
@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. |
CRogos
left a comment
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.
CRogos
left a comment
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.
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.
| 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}"] | ||
|
|
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.
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.
That could be a future addition, but it is out of scope for us at this point.
ae851ec to
f503093
Compare
f503093 to
ba918bc
Compare
|
Commits squashed. |


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