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

[16.0][IMP] mail_multicompany: search most appropriate server based on the from email #612

Conversation

MarinaAForgeFlow
Copy link
Contributor

No description provided.

@MarinaAForgeFlow MarinaAForgeFlow force-pushed the 16.0-imp-mail_multicompany-find_most_appropriate_server branch from 636faf5 to 8a970f3 Compare April 24, 2024 11:32
@OCA-git-bot
Copy link
Contributor

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

Copy link

@JordiMForgeFlow JordiMForgeFlow left a comment

Choose a reason for hiding this comment

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

code review

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

LGTM

self.sudo().env["ir.mail_server"].search([("company_id", "=", company_id)])
)
if not mail_servers:
return False, email_from
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return False, email_from
return None, email_from

as the same odoo does in _find_mail_server

Copy link

@luisg123v luisg123v left a comment

Choose a reason for hiding this comment

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

Missing commit description.

mail_multicompany/models/mail_message.py Outdated Show resolved Hide resolved
@MarinaAForgeFlow MarinaAForgeFlow force-pushed the 16.0-imp-mail_multicompany-find_most_appropriate_server branch from 8a970f3 to 87541e5 Compare April 25, 2024 07:22
This commit improves the create() overwritte on the mail_message class so that the mail server selected is the most apropriate taking into account the from email, but considering only the mail servers of the current company.
@MarinaAForgeFlow MarinaAForgeFlow force-pushed the 16.0-imp-mail_multicompany-find_most_appropriate_server branch from 87541e5 to 55b5d47 Compare April 25, 2024 07:24
@JordiBForgeFlow
Copy link
Sponsor Member

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-612-by-JordiBForgeFlow-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 814d847 into OCA:16.0 May 7, 2024
5 checks passed
@OCA-git-bot
Copy link
Contributor

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

@MiquelRForgeFlow MiquelRForgeFlow deleted the 16.0-imp-mail_multicompany-find_most_appropriate_server branch May 7, 2024 16:45
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.

7 participants