odoo/industry#1633
Created by Amardeep Sharma (amas)
Blocked
- Merge method
- Review
-
CI
- ci/industry: (runtime 27s)
- label
- odoo-dev:19.0-prevent-message-notification-while-installing-industry-amas
- head
- 5c2a7b57ccb432c6f2400f07a7e908910c1cea8a
| odoo/industry | |
|---|---|
| 19.0 | #1633 missing r+ |
| saas-19.1 | |
| saas-19.2 | |
| master |
[IMP] *: Do not pollute message and notification box when installing an industry
- Remove res_users.xml forcing notification_type='inbox' so modules generate
mails again. - Read generated mails via _read_group and browse related records.
- Inspect linked mail.activity and handle upsell activities separately:
- Identify upsell activities from note content.
- Ignore upsell activities without external IDs when their count matches
generated mails. - Process remaining activities to detect missing contexts.
- Suggest required contexts to prevent message/mail pollution.
- Log warnings with external IDs and recommended contexts.
- Add validation on XML <function> nodes to ensure required mail-prevention
contexts are set. - Introduce helper log_warning to standardize missing-context warnings.
- Add specific checks:
- slide.channel: ensure publish_template_id is set to False.
- sale.order.action_confirm: require mail_auto_subscribe_no_notify and
mail_notrack when subscription SO is present. - Functions defined in FUNCTION_CONTEXT_DICT_WITHOUT_USER:
enforce mail_auto_subscribe_no_notify.- write calls updating user_id / user_ids: require
mail_auto_subscribe_no_notify to prevent unwanted followers/mails.
- write calls updating user_id / user_ids: require
- Safely parse function context using literal_eval with fallback handling.
Context Used
- mail_auto_subscribe_no_notify: Prevents notifications that are normally sent
when users are automatically added as followers. By default this is False,
meaning notifications are sent — enable it to stay silent. - mail_activity_quick_update: When creating activities for other users, this
avoids sending them a notification about the new activity. - mail_notrack: During create or write, disables field change tracking so no
automatic “value changed” messages are posted. - no_mail_to_attendees: Stops email notifications from being sent to event attendees.
Task ID: 5262306