d2b68d186e4ee61aecd6e69aec77d4518d1ce22f
Issue ----- When website is installed, the rendering of template uses a side effect of the ORM cache (cache shared between sudoed env vs non-sudoed env) and the fields prefetching feature to work correctly. The `self.visibility` in (`_handle_visibility`, website/ir_ui_view.py) is done in sudo mode, then it will fetch all prefetchable fields and put them in the cache (that will be read in non-sudo mode in the render of the template). Another example of issue related to this: https://github.com/odoo/odoo/pull/83341. Because of this, the fields of mixin `website.seo.metadata` were forced to be prefetchable (the default for translate is to be not prefetchable since https://github.com/odoo/odoo/pull/82896), which causes a useless LEFT JOIN on "ir_translation" in most of business flow. Fix --- Remove the `prefetch=True` on mixin fields, and add a extra read to fill the cache in case of website rendering. It also allows to read these fields at the same time. Part-of: odoo/odoo#85220
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%