social icon indicating copy to clipboard operation
social copied to clipboard

[16.0][FIX] mail_activity_team, fix double send activity notification

Open ChrisOForgeFlow opened this issue 1 year ago • 12 comments

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

ChrisOForgeFlow avatar Aug 08 '24 14:08 ChrisOForgeFlow

How can the activity be created with team_user_id different from user_id ? Can I do that as a user?

AaronHForgeFlow avatar Aug 08 '24 15:08 AaronHForgeFlow

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

ChrisOForgeFlow avatar Aug 08 '24 15:08 ChrisOForgeFlow

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.

github-actions[bot] avatar Dec 29 '24 12:12 github-actions[bot]

Can someone reopen this?

AaronHForgeFlow avatar Feb 03 '25 10:02 AaronHForgeFlow

@etobella do you have rights to reopen?

JordiBForgeFlow avatar Feb 03 '25 10:02 JordiBForgeFlow

@etobella gracies!

JordiBForgeFlow avatar Feb 03 '25 10:02 JordiBForgeFlow

Can you rebase?

etobella avatar Feb 03 '25 11:02 etobella

Rebased! @etobella

AaronHForgeFlow avatar Feb 03 '25 14:02 AaronHForgeFlow

Tests are failing. Can you check it?

etobella avatar Feb 03 '25 14:02 etobella

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:

AaronHForgeFlow avatar Feb 03 '25 15:02 AaronHForgeFlow

@ChrisOForgeFlow Is it related also to https://github.com/OCA/social/pull/1353 ?

rousseldenis avatar Feb 13 '25 10:02 rousseldenis

@ChrisOForgeFlow Is it related also to #1353 ?

It seems to me both resolve the same issue

AaronHForgeFlow avatar Feb 13 '25 10:02 AaronHForgeFlow

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.

github-actions[bot] avatar Jul 13 '25 12:07 github-actions[bot]