[IMP] mail_activity_team: Improve default team ID retrieval and update field defaults#149
[IMP] mail_activity_team: Improve default team ID retrieval and update field defaults#149
Conversation
|
Hi @CRogos , tested it and it does seem to fix yes (I tested it with the hr_holiday workflow). |
|
This probably means one thing: server side code that create activities will not have a team_id set by default, even if a matching team exists for that model and user. Is that wanted? |
|
I agree. I don't think it really makes sense to set the team based on the user creating the activity, it should only be based on the assigned user. I also agree on removing the constraint, it can eventually be re-added by a custom module. |
StefanRijnhart
left a comment
There was a problem hiding this comment.
Thanks! Slightly worried about the loss of functionality here, even though I have my own workaround for this which very much amounts to the current change. Would it make sense to update the team if a user is set that is not a member of the current team? That might be possible if we rewrite team_id to be a stored, readwrite computed field.
A small number of tests might help to determine the impact of the change. Would you be able to work this out a little further?
|
@StefanRijnhart @lorenzomorandini I'll give it a try and keep you posted. |
2d81a4f to
b5029ff
Compare
|
@StefanRijnhart @lorenzomorandini Regarding the team_user_id I need to take a deeper look also in the tests. For now you could test the bugfix. |

Solves: #114
@StefanRijnhart could you have a look in this change?
What do you think about replacing team_user_id by user_id (removing team_user_id)?
I don't understand why this is needed.
@jgebel @lorenzomorandini could you review/test?