-
- Downloads
[IMP] mail: improve user notification model in mail.message
Currently if a message has a res_id and a res_model it appears in the matching record's chatter. Its access rights are computed based on this record. This is the standard behavior of mail.message model. User notifications are currently built on messages not having model and res_id in order to avoid appearing on chatter. This has several drawbacks notably access rights, redirection to the record, systray, finding back records, ... This commit solves those issues by adding new message_type 'user_notification' that should be as a classic mail.message with model and res_id but without the whole notification mechanism and without being displayed in the chatter. An user notification is now a classic message pushed to a given partner only and not displayed in the chatter. Related to task 1943901 Linked to PR #32404
Showing
- addons/mail/models/mail_activity.py 3 additions, 2 deletionsaddons/mail/models/mail_activity.py
- addons/mail/models/mail_mail.py 2 additions, 2 deletionsaddons/mail/models/mail_mail.py
- addons/mail/models/mail_message.py 81 additions, 41 deletionsaddons/mail/models/mail_message.py
- addons/mail/models/mail_thread.py 20 additions, 15 deletionsaddons/mail/models/mail_thread.py
- addons/mail/static/src/js/models/messages/message.js 1 addition, 1 deletionaddons/mail/static/src/js/models/messages/message.js
- addons/test_mail/tests/test_message_compose.py 3 additions, 1 deletionaddons/test_mail/tests/test_message_compose.py
- addons/test_mail/tests/test_performance.py 1 addition, 1 deletionaddons/test_mail/tests/test_performance.py
Loading
Please register or sign in to comment