Thursday, June 18, 2026
4 changes · master
Code cleanup and technical improvements
This update removes outdated and easily replaceable 'useComponent' elements across several Odoo modules. This refactoring streamlines the codebase and improves maintainability. The changes primarily affect the account reports and knowledge modules, ensuring a cleaner and more efficient system.
Original PR description
Remove some useComponent that can easily be replaced. Task-6268109 PR community: https://github.com/odoo/odoo/pull/267742
This update modernizes the IoT module by transitioning to a new standard for defining component properties (OWL3). Unused prop definitions related to a reporting component have also been removed, streamlining the module's structure and reducing complexity.
Original PR description
This commit changes all the props definitions in the IoT module to the new OWL3 style. It also removes the prop definitions for the `IoTReportLocalStorage` component, as the props are never used.
This update refactors how Odoo determines the current website, moving from a database query to a controller-based approach. This change enhances efficiency and stability by avoiding reliance on the original `website` model method. The update improves the underlying data retrieval process.
Original PR description
The corresponding community PR adds a controller `/website/get_current_website_id` to get the current website. This commit uses it instead of the `website` model's method `get_current_website`.
This update simplifies website routing by replacing older methods with a more reliable approach. It ensures that website-specific data is consistently accessed, leading to improved accuracy and stability. Future work will address more complex fallback scenarios.
Original PR description
[REF] base/website: migrate controllers and models to `self.env.website` Replaced legacy `get_current_website()` calls with `self.env.website` across controllers and models where fallback behavior…
[REF] base/website: migrate controllers and models to `self.env.website` Replaced legacy `get_current_website()` calls with `self.env.website` across controllers and models where fallback behavior was unintended. Mechanics & Context: - For routes defined with `website=True`, the routing layer automatically injects `website_id` into the context. - `self.env.website` natively reads this `website_id` from the context, behaving exactly like `get_current_website(fallback=False)` (without falling back to `host_id` or the first available website). - `host_id` (added during routing) represents the website matched strictly by domain name, independent of `website=True` or website-module specific overrides. Scope of Cleanup: This PR intentionally focuses only on the call sites that can be safely converted to a plain `self.env.website`. Locations that require explicit fallback handling, such as falling back to `host_id` (the strict domain-matched website) or a default website, have been left out of this pass when it's linked to a complex feature or behavior. They require deeper analysis and will be addressed in a subsequent PR.