Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][IMP] mail_composer_cc_bcc: filter out partner with no email address and set "" for partner with no name #1293

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

sonhd91
Copy link

@sonhd91 sonhd91 commented Feb 6, 2024

  • Normally a wizard opens on Odoo client side to prompt user to define an email address for partners that don't have one
  • But it's possible to bypass it, so we explicitly filter out partners with no email address
  • We also return "" instead of "False" for partner with no name, and odoo's tools.formataddr will just use the partner's email address

@OCA-git-bot
Copy link
Contributor

Hi @hailangvn2023,
some modules you are maintaining are being modified, check this out!

@sonhd91 sonhd91 changed the title [IMP] mail_composer_cc_bcc: filter out partner with no email address and set "" for partner with no name [15.0][IMP] mail_composer_cc_bcc: filter out partner with no email address and set "" for partner with no name Feb 6, 2024
emails = [
tools.formataddr((p.name or "False", p.email or "False")) for p in partners
]
emails = [tools.formataddr((p.name or "", p.email)) for p in partners if p.email]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
emails = [tools.formataddr((p.name or "", p.email)) for p in partners if p.email]
emails = [tools.formataddr((p.name, p.email)) for p in partners if p.email]

Copy link
Author

Choose a reason for hiding this comment

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

Updated, please checked again

- Normally a wizard opens on Odoo client side to prompt user to define an email address for partners that don't have one
- But it's possible to bypass it, so we explicitly filter out partners with no email address
- We also return "" instead of "False" for partner with no name, and odoo's tools.formataddr will just use the partner's email address
@sonhd91 sonhd91 force-pushed the 15.0-imp-mail_composer_cc_bcc branch from 7855319 to ef21fb0 Compare March 26, 2024 02:08
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 28, 2024
@github-actions github-actions bot closed this Sep 1, 2024
@leemannd
Copy link

leemannd commented Nov 5, 2024

Hello, can this PR be reopened and merged? Unless that I have opened a new one to be able to do a followup if requested.

Copy link

@leemannd leemannd left a comment

Choose a reason for hiding this comment

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

Approved

@hbrunn hbrunn reopened this Nov 5, 2024
@OCA-git-bot
Copy link
Contributor

Hi @hailangvn2023,
some modules you are maintaining are being modified, check this out!

@hbrunn
Copy link
Member

hbrunn commented Nov 5, 2024

/ocabot merge minor

no idea what's going on with runboat, and I'm overriding @hailangvn2023 as this handle seems inactive. The module should get a new maintainer then or be orphaned

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 15.0-ocabot-merge-pr-1293-by-hbrunn-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 129d071 into OCA:15.0 Nov 5, 2024
12 of 13 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 7c072b1. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved merged 🎉 stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants