Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

ChrisOForgeFlow
Copy link
Contributor

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

@AaronHForgeFlow
Copy link
Contributor

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

@ChrisOForgeFlow
Copy link
Contributor Author

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

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants