This question has been flagged

I'm looking for some creative ideas to fix the way Odoo sends emails from a multicompany environment. Currently there can be only 1 primary domain per company/database which is set in web.base.url (Settings / Technical / Parameters / System Parameters). Every link generated uses either url set in web.base.url or when not set uses website with id=1. 

Seems like there must be a way to manipulate the way Odoo generates links for sales orders and invoices so customers get direct to proper company portal url based on Default Company set for User.

Here is my scenario using Odoo 14.0 saas:

-Multi-company enabled, Company A and Company B

-Website app is installed with 2 different company websites, Company A and Company B

-Company A is primary company

-If database is accessed via Company A url with access to multicompany A, everything works great. Sales order emails generate using Company A url directing it to proper company portal.

-If database is access via Company B url the file web.base.url overwrites from Company A to Company B url. So now all every email link is directed to Company B url even for other users signed into Company A. This should not happen. This can be prevented by renaming it to web.base.url.freeze

-Since url CAN be changed by just user sign in, could this be used to change web.base.url from id=1 to id-2 based on user default company instead of sign in? Or somehow control how url is generated?

Any suggestions are welcome. Thank you in advance.

Avatar
Discard
Best Answer

Anyone looking for help with this, I have yet to find a satisfactory solution after 5 years of Odoo experience and decided to write a module for this.
https://apps.odoo.com/apps/modules/browse?search=ous_multi_company_email

Avatar
Discard
Best Answer

Hi, I just want to tell you that I am facing the same issue, and I am fed up with no solutiosn for such basic and important features, still with no solution even people asking for it since v7....this is crazy...they are doing crazy stuff like IAP, VOIP, OCR etc, but this very basic functional thing nobody fixed for 10 years...disappointing..If you managed to fix it, let me know please...

Avatar
Discard