Daily updates from Odoo
Tuesday, July 7, 2026
11 changes
Code cleanup and technical improvements
Odoo Studio’s form editor now uses the current rendering approach so selected fields and labels are decorated at the right moment. This keeps sidebar updates and drag-and-drop editing behavior reliable while removing an outdated compatibility method.
Original PR description
Replaced `useLayoutEffect` in `InnerGroupItemComponent` with `onMounted` + `onPatched` because `useLayoutEffect` is deprecated in OWL3. The single effect decorated label/field DOM elements with…
Replaced `useLayoutEffect` in `InnerGroupItemComponent` with `onMounted` + `onPatched` because `useLayoutEffect` is deprecated in OWL3. The single effect decorated label/field DOM elements with studio CSS classes immediately after each render. A reactive `useEffect` (OWL3's signal-based scheduler) re-runs asynchronously, so `studio_view.updateActiveNode` — which reads `.o-web-studio-editor--element-clickable` via `el.closest()` right after the view re-renders — found the label without the class, and the `o-web-studio-editor--element-clicked` decoration was never applied. `onMounted` + `onPatched` run synchronously within the patch commit, matching the timing the compat `useLayoutEffect` provided (which is itself implemented via `onMounted`/`onPatched`). `labelRef` and `fieldRef` were converted from OWL2 compat `useRef` wrappers to plain `signal(null)` class fields so the template uses `t-ref="this.labelRef"` / `t-ref="this.fieldRef"` and the refs are read with `this.labelRef()` / `this.fieldRef()` inside `applyStudioClasses`. The unrelated `rootRef` in `OuterGroup`/`InnerGroup` is kept as `useRef` since those classes have not been migrated. The useLayoutEffect refactored in this PR had test coverage — below are some tests that failed when the effect was commented out, and are now passing: - @web_studio/view_editors/form_editor/move a field in form - @web_studio/view_editors/form_editor/correctly display hook below group title - @web_studio/view_editors/interactive_editor_sidebar/update sidebar after edition see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2602198/build/115250548
The VoIP test environment now handles country data requests the same way the live application does. This prevents unnecessary warnings and missing mock responses during softphone testing, making automated tests more reliable without changing user-facing behavior.
Original PR description
The mock server now dispatches /mail/store requests through a store handler registry, mirroring the python controllers. Register voip's res.country store handler in the mock so it matches voip/controllers/webclient.py; otherwise the registry warns (and serves nothing) every time the softphone fetches res.country during tests. https://github.com/odoo/odoo/pull/273720
This update modernizes internal test setup across several enterprise apps to match the newer application-based testing approach. It helps keep automated tests aligned with the current platform architecture without changing end-user functionality.
Original PR description
* documents,iot,obox,pos_enterprise,room,spreadsheet_edition,timer, web_grid,web_studio This commit replaces every occurence of `makeMockEnv` by `makeTestApp`. An app is the minimum test unit since owl3 compared to owl2 where it was the env. The commit also changes a little bit some helpers the multi tab tests (bus, imlivechat, mail) to depend less on the env and more on the helpers.
The spreadsheet-related apps were updated to support Odoo's newer interface framework. This is an internal modernization that helps keep document spreadsheets and spreadsheet dialogs reliable as the platform evolves.
Original PR description
* = [spreadsheet_edition] As part of the migration from `owl 2` to `owl 3`, this commit replaces uses of `t-custom-model` with `t-model` or `t-model.proxy`.
The VoIP softphone was updated to use newer platform mechanisms while preserving the same user experience. This helps ensure the softphone opens correctly, keeps the right tab selected, and focuses the search bar when users reopen it.
Original PR description
Replaced `useLayoutEffect` with `onWillRender` + `onMounted` + `onPatched` because `useLayoutEffect` is deprecated in OWL3. `useEffect` was tried first but its microtask-deferred re-runs are…
Replaced `useLayoutEffect` with `onWillRender` + `onMounted` + `onPatched` because `useLayoutEffect` is deprecated in OWL3. `useEffect` was tried first but its microtask-deferred re-runs are decoupled from the render/patch cycle. On softphone reopen (hide → systray click), the batched re-run arrived after the click already set `isDisplayed = true`, so the effect read the already-true flag and called `hide()` a second time — leaving the softphone closed and the search-bar input unfocused. The fix reproduces the original render-coupled timing with three native hooks: `onWillRender` subscribes the component to the reactive proxy so state changes trigger re-renders; `onMounted` applies the initial show/hide/promote logic; `onPatched` applies it on every subsequent render — matching the behaviour of the original `useLayoutEffect` exactly. The useLayoutEffect refactored in this PR had test coverage — below are some tests that failed when the effect was commented out, and are now passing: - @voip/softphone/softphone/Opening the softphone selects the Recent tab. - @voip/softphone/softphone/Search bar is focused after reopen the softphone. - @voip/softphone/activity_tab/Call activities are displayed in the "Activities" tab. see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2596849/build/114857981
The payroll resource logic was simplified by replacing an older helper with direct working-period checks. This is an internal cleanup that should make future maintenance easier without changing day-to-day payroll behavior.
The Knowledge app was updated to keep its editor commands working correctly after a framework change. This preserves expected Knowledge and Helpdesk interactions, such as using articles, files, and templates, while reducing reliance on deprecated code.
Original PR description
Replaced `useLayoutEffect` in `FormControllerPatch.setup()` with `onMounted`/`onPatched` because `useLayoutEffect` is deprecated in OWL3. `useLayoutEffect` ran post-mount, after the chatter had…
Replaced `useLayoutEffect` in `FormControllerPatch.setup()` with `onMounted`/`onPatched` because `useLayoutEffect` is deprecated in OWL3. `useLayoutEffect` ran post-mount, after the chatter had registered its `__knowledgeUpdateCommandsRecordInfo__` callback. `useEffect` ran during `setup`, before the chatter was ready, so chatter access rights were never recorded. `onMounted`/`onPatched` with a `lastResId` guard restores the original post-mount timing and only re-evaluates on record navigation. 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: - TestKnowledgeEditorCommands.test_knowledge_article_commands_tour - TestHelpdeskKnowledgeCrossModuleFeatures.test_helpdesk_pick_file_as_attachment_from_knowledge - TestHelpdeskKnowledgeCrossModuleFeatures.test_helpdesk_pick_template_as_description_from_knowledge see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2604778/build/115379873
Several accounting-related screens were updated to use the newer interface framework required by the Owl 3 migration. This is an internal modernization that helps keep bank reconciliation, import guidance, and reporting views compatible and maintainable without changing business workflows.
Original PR description
*account_reports As part of the Owl 3 migration, replace deprecated onWillRender hooks with the appropriate Owl 3 alternatives.
The report editor was updated to use newer supported framework behavior, keeping breadcrumb updates working as before. This reduces technical debt and helps ensure the feature remains compatible with upcoming platform changes without changing the user experience.
Original PR description
Replaced `useLayoutEffect` with `onMounted` + `useEffect` because `useLayoutEffect` is deprecated in OWL3. The original effect had an empty dep array (run-once). Its body did two things: (1) pushed the crumb onto the editor breadcrumbs — a one-time side-effect that maps to `onMounted`, matching how `useEditorBreadcrumbs` pushes its own `initialCrumb`; (2) started a reactive `effect()` keeping `crumb.name` in sync with `rem.reportData?.name`, returning the dispose fn as cleanup — this was replaced by `useEffect`, which auto-tracks the reactive read and is auto-disposed on unmount. The use layoutEffect refactored in this PR had test coverage — below are some tests that failed when the effect was commented out, and are now passing: - TestReportEditorUIUnit.test_basic_report_edition - TestReportEditorUIUnit.test_basic_report_edition_discard - TestReportEditorUIUnit.test_xml_and_form_diff see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2624594/build/116553758
This update replaces an outdated internal mechanism in the grid view with the newer supported approach. It helps keep the grid reliable and ready for the next version of the underlying interface framework, without changing how users work with it.
Original PR description
Replaced `useLayoutEffect` with `onMounted` + `onPatched` because `useLayoutEffect` is deprecated in OWL3. The single tracked dependency was `component.props.reactive.cell` — a reactive property…
Replaced `useLayoutEffect` with `onMounted` + `onPatched` because `useLayoutEffect` is deprecated in OWL3. The single tracked dependency was `component.props.reactive.cell` — a reactive property holding the cell's HTMLElement (or null). The effect body wrote `component.state.cell` and immediately re-read it (via `state.cell.row.isSection` and `component.isEditable()`). A native OWL3 `useEffect` subscription was tried first but failed: the signal effect runs eagerly during `setup()`, before mount, so `rootRef.el` is null on the first run when `props.reactive.cell` is truthy, crashing with `Cannot read properties of null (reading 'style')`. Since the component already re-renders whenever `reactive.cell` changes (the overlay root is `<div t-if="props.reactive.cell">`), plain `onMounted` + `onPatched` running the same body is sufficient: `rootRef.el` is guaranteed present whenever `cellEl` is truthy, no `untrack` is needed, and the lifecycle callbacks reproduce the original post-render timing exactly. The use of `useLayoutEffect` refactored in this PR had test coverage — below are some tests that failed when the effect was commented out, and are now passing: - @web_grid/grid_view/grid_view_desktop/editing a value - @web_grid/grid_cells/float_toggle_grid_cell/FloatToggleGridCell: click to focus - @web_grid/grid_view/grid_view_desktop/Edition navigate with tab/shift+tab and enter key see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2624597/build/116553714
This updates the Sign app’s internal upload handling to stay compatible with the next version of Odoo’s web framework. Drag-and-drop document uploads keep working as before, with tests confirming the behavior.
Original PR description
Replaced `useLayoutEffect` with `onMounted`/`onWillUnmount` because `useLayoutEffect` is deprecated in OWL3. `useListener` was considered first but cannot be used here: `.o_content` is an ancestor element owned by the layout component, not by `DocumentUploadMixin` itself, so there is no reactive signal or ref to give it. `onMounted` resolves `.o_content` once the component is in the DOM (guaranteed present), stores it, and attaches the three drag event listeners (dragover, dragleave, drop); `onWillUnmount` removes them — exactly reproducing the original post-mount timing and cleanup semantics. The useLayoutEffect refactored in this PR had test coverage — below are some tests that failed when the effect was commented out, and are now passing: - @sign/sign_kanban/Drop to upload file in kanban see commented-out runbot build: https://runbot.odoo.com/runbot/batch/2596830/build/114857573