Files
odoo_source/addons/test_website/tests
Romain Derie 5a8d6c351b [IMP] website, test_website: avoid a query on res_company_user_rel
Manual forward port, commit was lost from 15.2 to master. Either it
seemed not needed after the httpocalypse refactoring, or was simply
lost during the rebase.

-----

We can remove an useless SQL Query for public user on every single page
serve, if we directly set the website's company_id in the available
company_ids of the public user.

Indeed, the public user from a website always have the same company_id
as the website.

We can then do that directly and bypass the next line which will
always be true in the case of the public user, making a read for
nothing.

task-2774979

closes #85419

X-original-commit: c95ab6f

[1]: https://github.com/odoo/odoo/commit/728ade674cb12c64718efda56b0d5d542e319cba

closes odoo/odoo#87856

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-04-06 19:32:44 +02:00
..