Skip to content

[6282][IMP] mail_post_defer: consider force_send context#114

Open
smorita7749 wants to merge 2 commits into
15.0from
6282-imp-mail_post_defer
Open

[6282][IMP] mail_post_defer: consider force_send context#114
smorita7749 wants to merge 2 commits into
15.0from
6282-imp-mail_post_defer

Conversation

@smorita7749
Copy link
Copy Markdown
Contributor

@smorita7749 smorita7749 commented Apr 16, 2026

6282

Standard Odoo modules (e.g. sale.order) use with_context(force_send=True) to request immediate email delivery. However, mail_post_defer was not checking force_send in context, causing these emails to be deferred unexpectedly. This change adds the context check so that force_send=True in context is properly considered.

@yostashiro
Copy link
Copy Markdown
Member

@smorita7749 Please update commit message and PR title so that it's clear what this update is about.

@smorita7749 smorita7749 force-pushed the 6282-imp-mail_post_defer branch from 83539e9 to 4e10637 Compare April 17, 2026 01:34
@smorita7749 smorita7749 changed the title [6282][IMP] mail_post_defer [6282][IMP] mail_post_defer: consider force_send context Apr 17, 2026
@smorita7749
Copy link
Copy Markdown
Contributor Author

I updated PR title and the background.

@AungKoKoLin1997
Copy link
Copy Markdown
Contributor

@smorita7749 Can you please add a test case about the new context by preparing the same workflow of sale order by calling message_post_with_template?

@smorita7749
Copy link
Copy Markdown
Contributor Author

@smorita7749 Can you please add a test case about the new context by preparing the same workflow of sale order by calling message_post_with_template?

I added a test case that calls message_post_with_template with force_send in the context, mirroring the sale order workflow.
Also, I created the same PR to OCA.

Copy link
Copy Markdown
Member

@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

LGTM.

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