Skip to content

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

Closed
fw-bot wants to merge 1 commit intoodoo:saas-19.1from
odoo-dev:saas-19.1-19.0-prevent-message-notification-while-installing-industry-amas-496270-fw
Closed

[IMP] *: Do not pollute message and notification box when installing an industry#1982
fw-bot wants to merge 1 commit intoodoo:saas-19.1from
odoo-dev:saas-19.1-19.0-prevent-message-notification-while-installing-industry-amas-496270-fw

Conversation

@fw-bot
Copy link
Copy Markdown

@fw-bot fw-bot commented Apr 9, 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

Forward-Port-Of: #1633

@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented Apr 9, 2026

Pull request status dashboard

@fw-bot
Copy link
Copy Markdown
Author

fw-bot commented Apr 9, 2026

@amas-odoo @vava-odoo cherrypicking of pull request #1633 failed.

stdout:

Auto-merging architects/__manifest__.py
Auto-merging art_craft/__manifest__.py
Auto-merging automobile/__manifest__.py
Auto-merging bakery/__manifest__.py
Auto-merging bar_industry/__manifest__.py
Auto-merging beverage_distributor/__manifest__.py
Auto-merging bike_leasing/__manifest__.py
Auto-merging bike_shop/__manifest__.py
CONFLICT (content): Merge conflict in bike_shop/__manifest__.py
Auto-merging bike_shop/demo/res_partner.xml
CONFLICT (content): Merge conflict in bike_shop/demo/res_partner.xml
Auto-merging billboard_rental/__manifest__.py
Auto-merging booking_engine/__manifest__.py
Auto-merging bookstore/__manifest__.py
Auto-merging bowling/demo/calendar_event.xml
CONFLICT (content): Merge conflict in bowling/demo/calendar_event.xml
Auto-merging cake_shop/demo/sale_order.xml
Auto-merging certification_organism/__manifest__.py
Auto-merging certification_organism/demo/res_partner.xml
CONFLICT (content): Merge conflict in certification_organism/demo/res_partner.xml
Auto-merging climbing_gym/demo/event_event.xml
Auto-merging clothing_boutique/__manifest__.py
Auto-merging coal_petroleum/__manifest__.py
Auto-merging concert_halls/demo/event_event.xml
Auto-merging condominium/demo/res_partner.xml
CONFLICT (content): Merge conflict in condominium/demo/res_partner.xml
Auto-merging corporate_gifts/__manifest__.py
Auto-merging cosmetics_store/__manifest__.py
Auto-merging cosmetics_store/demo/res_partner.xml
CONFLICT (content): Merge conflict in cosmetics_store/demo/res_partner.xml
Auto-merging coworking/demo/calendar_event.xml
Auto-merging coworking/demo/event_event.xml
Auto-merging coworking/demo/res_partner.xml
CONFLICT (content): Merge conflict in coworking/demo/res_partner.xml
Auto-merging custom_furniture/__manifest__.py
Auto-merging diy_workshops/demo/event_event.xml
Auto-merging diy_workshops/demo/res_partner.xml
CONFLICT (content): Merge conflict in diy_workshops/demo/res_partner.xml
Auto-merging driving_school/demo/calendar_event.xml
Auto-merging elearning_platform/demo/res_partner.xml
CONFLICT (content): Merge conflict in elearning_platform/demo/res_partner.xml
Auto-merging electronic_store/__manifest__.py
Auto-merging environmental_agency/demo/calendar_event.xml
Auto-merging event_management/demo/event_event.xml
Auto-merging eyewear_shop/demo/res_partner.xml
CONFLICT (content): Merge conflict in eyewear_shop/demo/res_partner.xml
Auto-merging fast_food/__manifest__.py
Auto-merging fitness/__manifest__.py
Auto-merging fitness/demo/calendar_event.xml
Auto-merging florist/demo/res_partner.xml
CONFLICT (content): Merge conflict in florist/demo/res_partner.xml
Auto-merging fmcg_store/__manifest__.py
Auto-merging food_trucks/demo/res_partner.xml
CONFLICT (content): Merge conflict in food_trucks/demo/res_partner.xml
Auto-merging hair_salon/demo/calendar_event.xml
Auto-merging hardware_shop/__manifest__.py
Auto-merging headhunter/__manifest__.py
Auto-merging headhunter/demo/calendar_event.xml
Auto-merging industry_lawyer/__manifest__.py
Auto-merging industry_restaurant/demo/calendar_event.xml
Auto-merging it_hardware/__manifest__.py
Auto-merging library/demo/event_event.xml
Auto-merging marketing_agency/demo/event_event.xml
Auto-merging members_club/demo/event_event.xml
Auto-merging mental_therapy/__manifest__.py
Auto-merging mental_therapy/demo/calendar_event.xml
Auto-merging museum/__manifest__.py
Auto-merging museum/demo/event_event.xml
Auto-merging non_profit_organization/demo/res_partner.xml
CONFLICT (content): Merge conflict in non_profit_organization/demo/res_partner.xml
Auto-merging odoo_partner/__manifest__.py
Auto-merging odoo_partner/demo/res_partner.xml
CONFLICT (content): Merge conflict in odoo_partner/demo/res_partner.xml
Auto-merging outdoor_activities/__manifest__.py
Auto-merging outdoor_activities/demo/calender_event.xml
Auto-merging personal_trainer/__manifest__.py
Auto-merging personal_trainer/demo/calendar_event.xml
Auto-merging personal_trainer/demo/res_partner.xml
CONFLICT (content): Merge conflict in personal_trainer/demo/res_partner.xml
Auto-merging pharmacy_retail/__manifest__.py
Auto-merging photography/__manifest__.py
Auto-merging physical_therapy/__manifest__.py
Auto-merging physical_therapy/demo/calendar_event.xml
Auto-merging real_estate/demo/calendar_event.xml
Auto-merging solar_installation/__manifest__.py
Auto-merging spa_resort/demo/calendar_event.xml
Auto-merging sport_events/__manifest__.py
Auto-merging sport_events/demo/event_event.xml
Auto-merging sport_events/demo/res_partner.xml
CONFLICT (content): Merge conflict in sport_events/demo/res_partner.xml
Auto-merging sports_club/__manifest__.py
Auto-merging sports_club/demo/calendar_event.xml
Auto-merging student_organization/demo/event_event.xml
Auto-merging surveyor/__manifest__.py
Auto-merging tattoo_shop/demo/calendar_event.xml
Auto-merging team_sports_club/demo/res_partner.xml
CONFLICT (content): Merge conflict in team_sports_club/demo/res_partner.xml
Auto-merging tests/test_generic/tests/test_xml.py
CONFLICT (content): Merge conflict in tests/test_generic/tests/test_xml.py
Auto-merging theater/demo/event_event.xml
Auto-merging toy_store/__manifest__.py
Auto-merging veterinary_clinic/demo/calendar_event.xml
Auto-merging wine_merchant/demo/event_event.xml
Auto-merging yoga_pilates/demo/event_event.xml

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

:shipit: you can use git-fw to re-do the forward-port for you locally.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@amas-odoo amas-odoo force-pushed the saas-19.1-19.0-prevent-message-notification-while-installing-industry-amas-496270-fw branch from 83faed4 to 97d38d6 Compare April 14, 2026 13:13
…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

X-original-commit: 80a1604
@amas-odoo amas-odoo force-pushed the saas-19.1-19.0-prevent-message-notification-while-installing-industry-amas-496270-fw branch from 97d38d6 to 11d2ebe Compare April 14, 2026 13:39
@amas-odoo
Copy link
Copy Markdown
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request Apr 15, 2026
…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

closes #1982

X-original-commit: 80a1604
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
Signed-off-by: Amardeep Sharma (amas) <amas@odoo.com>
@robodoo robodoo closed this Apr 15, 2026
}
CONTEXT_MODELS_DICT = {
'calendar.event': 'no_mail_to_attendees',
'helpdesk.ticket': 'mail_notrack',
Copy link
Copy Markdown
Collaborator

@vava-odoo vava-odoo Apr 15, 2026

Choose a reason for hiding this comment

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

maybe this one was useful to keep, no?
EDIT: talking about no_vat_validation on res.partner

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants