[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.
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.
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.
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.