OCA / multi-company

GNU Affero General Public License v3.0
97 stars 279 forks source link

[15.0][ADD] mail_multicompany_force_company #618

Open iTecan opened 2 months ago

iTecan commented 2 months ago

After some testing we have found this issue with mail_multicompany and how odoo detects the mail servers.

We assume that normally the different companies configured will use domains/subdomains which will match the domains/subdomains of their users.

In this case the functionality of mail_multicompany is correct and a user cannot send through an outgoing mail server that does not correspond to him.

We have found another case, a companyA with domainA and another companyB with domainB configured and assigned respectively, if an employee of companyB has indicated the email employee@domainA in his profile, Odoo in its internal configuration will look for the best matching domain and will use the outgoing mail server of companyA regardless of the fact that it is not configured for companyB.

This module forces internally that the mails of each company go through the outgoing mail server assigned to them, preventing them to use any other.

In case there is an outgoing mail server without an assigned company, any company will be able to use it following the normal usage.

thomaspaulb commented 1 week ago

@iTecan I see that you are first-time contributor! Feel free to ask questions or ping for any help, explanation about guidelines etc. While being strict, we also want to keep people like you aboard :-)