social
social copied to clipboard
[16.0][FIX] mail_activity_team, fix double send activity notification
First notification is sent by
https://github.com/odoo/odoo/blob/16.0/addons/mail/models/mail_activity.py#L348
Because new field team_user_id is a related field, when both field are passed to create function, trigger a write to sync fields, because that in validation of change of user is trigger and send as a write
Second notification is send by this one, this is default when record is created
https://github.com/odoo/odoo/blob/16.0/addons/mail/models/mail_activity.py#L302-L303
With change proposed, send same value to both fields if team_user_id is filled
@ForgeFlow