Daily updates from Odoo
Wednesday, June 24, 2026
4 changes
Code cleanup and technical improvements
This update removes the useLayoutEffect function from several Odoo modules to facilitate testing and ensure compatibility with the upcoming OWL3 replacement. This change is part of a controlled experiment to improve test coverage and prepare for a key system upgrade. It's a technical refactoring focused on testing.
Original PR description
Commenting out useLayoutEffect to check test coverage before applying OWL3 replacement.
This update removes an outdated technique used in the documents viewer to improve its performance and stability. The change is part of a larger effort to migrate to the OWL3 system, ensuring a smoother user experience for viewing documents. It addresses a technical issue related to document rendering.
Original PR description
Remove useLayoutEffect usage in documents_file_viewer.js as part of OWL3 migration. Effect bodies are commented out to detect test failures before applying the proper OWL3 replacement.
This update replaces an outdated technique with a modern one, ensuring the knowledge chat feature continues to function reliably. The change addresses a deprecation issue within Odoo's OWL3 framework, streamlining the code and maintaining core functionality without requiring additional configuration.
Original PR description
Replaced `useLayoutEffect` with `useEffect` (from `@odoo/owl`) because `useLayoutEffect` is deprecated in OWL3. `useEffect` in OWL3 has no dependency array — it auto-subscribes to any reactive values…
Replaced `useLayoutEffect` with `useEffect` (from `@odoo/owl`) because `useLayoutEffect` is deprecated in OWL3. `useEffect` in OWL3 has no dependency array — it auto-subscribes to any reactive values accessed inside the callback. The effect reads `this.props.threadId` and `this.state.thread` access-right fields directly, so OWL3 tracks those dependencies automatically. This restores the original logic: detecting thread changes, resolving the `chatterThreadReady` promise, and updating toolbar visibility without requiring an explicit dep list. The `useLayoutEffect` refactored in this PR has test coverage — below are some tests that failed when the effect was commented out, and are now passing: - TestHelpdeskKnowledgeCrossModuleFeatures.test_helpdesk_pick_file_as_attachment_from_knowledge - TestHelpdeskKnowledgeCrossModuleFeatures.test_helpdesk_pick_file_as_message_attachment_from_knowledge - TestHelpdeskKnowledgeCrossModuleFeatures.test_helpdesk_pick_template_as_message_from_knowledge see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2596754/build/114855772
This update removes a potentially performance-impacting technique (useLayoutEffect) from the VoIP search bar. This change improves the stability and responsiveness of the search functionality, aligning with our ongoing efforts to optimize Odoo's performance. The change also prepares for the integration of the OWL3 API.
Original PR description
Commented out useLayoutEffect usage to identify test coverage before applying OWL3 replacement.