Skip to content

[19.0] mail_composer_cc_bcc: Migration to 19.0#104

Open
cyrilmanuel wants to merge 38 commits intoOCA:19.0from
camptocamp:19.0-mail_composer_cc_bcc
Open

[19.0] mail_composer_cc_bcc: Migration to 19.0#104
cyrilmanuel wants to merge 38 commits intoOCA:19.0from
camptocamp:19.0-mail_composer_cc_bcc

Conversation

@cyrilmanuel
Copy link
Copy Markdown

No description provided.

hailangvn and others added 30 commits November 3, 2025 09:50
Currently translated at 83.3% (15 of 18 strings)

Translation: social-16.0/social-16.0-mail_composer_cc_bcc
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_composer_cc_bcc/es/
Currently translated at 100.0% (18 of 18 strings)

Translation: social-16.0/social-16.0-mail_composer_cc_bcc
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_composer_cc_bcc/es/
Currently translated at 100.0% (18 of 18 strings)

Translation: social-16.0/social-16.0-mail_composer_cc_bcc
Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_composer_cc_bcc/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: social-17.0/social-17.0-mail_composer_cc_bcc
Translate-URL: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_composer_cc_bcc/
Currently translated at 100.0% (17 of 17 strings)

Translation: social-17.0/social-17.0-mail_composer_cc_bcc
Translate-URL: https://translation.odoo-community.org/projects/social-17-0/social-17-0-mail_composer_cc_bcc/it/
…onstraint "unique_mail_message_id_res_partner_id_if_set" when adding the same user to CC field that is already set as a follower
### This changes

1. Refactor _generate_template_recipients

2. Fix invalid-email-address for Bcc
   - In standard, Bcc key in dict message was stripped in
https://github.com/odoo/odoo/blob/4394940a09900aa5b42cbc05355880598608d1b6/odoo/addons/base/models/ir_mail_server.py#L676
   - Duplicate the key to retain for later assertion
Currently translated at 100.0% (17 of 17 strings)

Translation: mail-18.0/mail-18.0-mail_composer_cc_bcc
Translate-URL: https://translation.odoo-community.org/projects/mail-18-0/mail-18-0-mail_composer_cc_bcc/it/
@cyrilmanuel cyrilmanuel force-pushed the 19.0-mail_composer_cc_bcc branch from 73bfe5f to af5d8f3 Compare November 3, 2025 09:50
@imlopes imlopes force-pushed the 19.0-mail_composer_cc_bcc branch from e653654 to 6442af0 Compare November 14, 2025 12:46
Copy link
Copy Markdown
Contributor

@vvrossem vvrossem left a comment

Choose a reason for hiding this comment

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

LGTM, I think you can squash [IMP] Update code to match with v19 with [19.0][MIG] mail_composer_cc_bcc: Migration to 19.0.

And while you are at it:

Consider to squash administrative commits (if any) with the previous commit for reducing commit noise. Check https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests#mergesquash-the-commits-generated-by-bots-or-weblate for details.

Also, it could be the opportunity to update the .png files (if relevant)

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@imlopes imlopes force-pushed the 19.0-mail_composer_cc_bcc branch 2 times, most recently from c0cbcf5 to 60c3aa7 Compare November 19, 2025 11:15
@yankinmax yankinmax force-pushed the 19.0-mail_composer_cc_bcc branch from b2a4020 to 3877021 Compare November 20, 2025 18:26
@bosd
Copy link
Copy Markdown
Contributor

bosd commented Nov 21, 2025

@etobella Can you please merge?

@tuffstuff9
Copy link
Copy Markdown

LGTM

@visionsrlsolution
Copy link
Copy Markdown

When merge? any ETA? thx

@StefanRijnhart StefanRijnhart changed the title 19.0 mail composer cc bcc 19.0 mail_composer_cc_bcc Jan 28, 2026
@StefanRijnhart StefanRijnhart changed the title 19.0 mail_composer_cc_bcc [19.0] mail_composer_cc_bcc: Migration to 19.0 Jan 28, 2026
@StefanRijnhart
Copy link
Copy Markdown
Member

/ocabot migration mail_composer_cc_bcc

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Jan 28, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Jan 28, 2026
33 tasks
class IrMailServer(models.Model):
_inherit = "ir.mail_server"

def _prepare_email_message(self, message, smtp_session):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@davidepedraii
Copy link
Copy Markdown

Hello, we are experiencing some issues in the Version 19 of Odoo.sh , the issue is that: When sending emails with the BCC Module, we found an issue that when sending an email we encountered that the destination email didnt apparently exist, even if it exist and we have control of it, moreover the email resulted sent from Microsoft Outgoing email, but never recieved from the destination.

image

@giusybloomup
Copy link
Copy Markdown

giusybloomup commented Mar 12, 2026

When merge?
LGTM
thx :-)

@StefanRijnhart
Copy link
Copy Markdown
Member

@giusybloomup When the code is fixed

Copy link
Copy Markdown
Member

@NICO-SOLUTIONS NICO-SOLUTIONS left a comment

Choose a reason for hiding this comment

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

Reviewing prepare_email_message_ override and updated hash

class IrMailServer(models.Model):
_inherit = "ir.mail_server"

def _prepare_email_message(self, message, smtp_session):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
def _prepare_email_message(self, message, smtp_session):
def _prepare_email_message__(self, message, smtp_session):

Copy link
Copy Markdown
Member

@NICO-SOLUTIONS NICO-SOLUTIONS Apr 8, 2026

Choose a reason for hiding this comment

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

An extra double underscore was added to the method

)

VALID_HASHES = {
"mail.composer:_compute_partner_ids": ["4e49f0d6c53f41ac24b02176e97b600a"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"mail.composer:_compute_partner_ids": ["4e49f0d6c53f41ac24b02176e97b600a"],
"mail.composer:_compute_partner_ids": ["c3903ab78bf2e5d9aba078ac2689d974"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Updated hash to match the current upstream _compute_partner_ids

if x_odoo_bcc_value:
message["Bcc"] = x_odoo_bcc_value

smtp_from, smtp_to_list, message = super()._prepare_email_message(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
smtp_from, smtp_to_list, message = super()._prepare_email_message(
smtp_from, smtp_to_list, message = super()._prepare_email_message__(

Copy link
Copy Markdown
Member

@NICO-SOLUTIONS NICO-SOLUTIONS Apr 8, 2026

Choose a reason for hiding this comment

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

Call updated prepare_email_message_ method with extra double underscore

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.