Wednesday, February 15, 2023
3 changes · master
Code cleanup and technical improvements
Point of Sale now uses a shared approach for moving and resizing on-screen items, making these interactions easier to maintain and more consistent. Several popups are no longer draggable because moving them did not provide useful functionality and could confuse users.
Original PR description
Previously, the resize behaviour and the draggable behaviour were completely separate, even though a lot of the logic for both behaviours is common to both. This commit replaces both of these behaviours with a hook: useMovable that lets the user drag an object around, but lets the caller customize the behaviour on drag: when dragging a table or the debug menu, we want to move the object around by setting its position in its container, but when dragging a resize handle around, we want to resize the table while keeping the handle position in the table the same. This commit also makes a bunch of popups non draggable as it doesn't make sense for them to be draggable: you cannot interact with the content behind the popup for as long as the popup is open (unlike the debug menu), serves no functional purpose, and may occasionally confuse users.
This change streamlines how Odoo handles certain page reloads and navigation actions by removing an unnecessary internal redirect helper. Users should not see a functional difference, but the web client code becomes easier to maintain and less prone to confusion around reload behavior.
Original PR description
The redirect function in the router exists only for the wait option. This option is only used in one case (client action home). We have therefore decided to remove the redirect function and to call browser.location.assign(...) directly. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Odoo's web module has been cleaned up by removing old checkbox and systray compatibility code that is no longer used. This reduces maintenance overhead and helps keep the interface codebase simpler without changing current user workflows.
Original PR description
This commit removes the legacy CustomCheckbox and the backward compatibility layer for the systray items. Both of them are no longer used. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr