[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
How can the activity be created with team_user_id different from user_id ? Can I do that as a user?
How can the activity be created with team_user_id different from user_id ? Can I do that as a user?
It is not done by user, because field is hide, but is filled by other onchanges in same module when change team for example https://github.com/OCA/social/blob/16.0/mail_activity_team/models/mail_activity.py#L45
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
Can someone reopen this?
@etobella do you have rights to reopen?
@etobella gracies!
Can you rebase?
Rebased! @etobella
Tests are failing. Can you check it?
So sad. It seems there is an issue with mass_mailing_custom_unsubscribe & mail_composer_cc_bcc modules. Other PRs in 16.0 are failing because of the same reason. Hope someone fix it :smile:
@ChrisOForgeFlow Is it related also to https://github.com/OCA/social/pull/1353 ?
@ChrisOForgeFlow Is it related also to #1353 ?
It seems to me both resolve the same issue
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.