Skip to content

[18.0][FIX] mail_composer_cc_bcc: email_cc type - #249

Open
trisdoan wants to merge 1 commit into
OCA:18.0from
trisdoan:fix/18.0-fix-mail_composer_cc_bcc
Open

[18.0][FIX] mail_composer_cc_bcc: email_cc type#249
trisdoan wants to merge 1 commit into
OCA:18.0from
trisdoan:fix/18.0-fix-mail_composer_cc_bcc

Conversation

@trisdoan

Copy link
Copy Markdown
Contributor

Context

  • Earlier, mail_composer_cc_bcc overrides mail.mail._prepare_outgoing_list() and was putting a comma-joined string into email_to, where native produces a list.
  • Hence, mail_tracking re-joins email_to with COMMASPACE, which mangles a value that is already a string.
  • PR [18.0][FIX] mail_composer_cc_bcc: emails list #54 fixed it by making format_emails() return the list form

In the same commit, in the same function, email_cc was changed in the opposite direction — from the list form to the joined-string form:

 email_to = format_emails(partner_to)                 # list   — fixed by #54
-email_cc = format_emails(self.recipient_cc_ids)      # list   — was correct
+email_cc = format_emails_str(self.recipient_cc_ids)  # string — regression

So the commit made email_to a list and email_cc a string, in adjacent lines of the same dict.

Solution

restoring the list form so email_cc matches email_to on the line directly

@OCA-git-bot OCA-git-bot added series:18.0 mod:mail_composer_cc_bcc Module mail_composer_cc_bcc labels Aug 17, 2026
@trisdoan

Copy link
Copy Markdown
Contributor Author

Hello @norlinhenrik , could you take a look please?

@norlinhenrik

Copy link
Copy Markdown
Contributor
        email_cc = format_emails(self.recipient_cc_ids)
        email_bcc = [r.email for r in self.recipient_bcc_ids if r.email]

Maybe email_bcc should be similar to email_cc?

Please install mail_tracking also, and send an email to multiple CC and multiple BCC. If you confirm that it works, I will approve this PR.

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

Labels

mod:mail_composer_cc_bcc Module mail_composer_cc_bcc series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants