Skip to content

[IMP] *: Do not pollute message and notification box when installing an industry#1633

Open
amas-odoo wants to merge 3 commits intoodoo:19.0from
odoo-dev:19.0-prevent-message-notification-while-installing-industry-amas
Open

[IMP] *: Do not pollute message and notification box when installing an industry#1633
amas-odoo wants to merge 3 commits intoodoo:19.0from
odoo-dev:19.0-prevent-message-notification-while-installing-industry-amas

Conversation

@amas-odoo
Copy link
Contributor

@amas-odoo amas-odoo commented Feb 4, 2026

  • 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 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.
  • 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

…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.
- Safely parse function context using literal_eval with fallback handling.

Task ID: 5262306
@robodoo
Copy link
Collaborator

robodoo commented Feb 4, 2026

Pull request status dashboard

@pgu-odoo
Copy link
Contributor

pgu-odoo commented Feb 5, 2026

@vava-odoo PR is ready for your review.
@amas-odoo Thanks for the great and huge work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants