Friday, January 5, 2024
3 changes · master
Code cleanup and technical improvements
The Mail app's web push notification code was moved into clearer locations and renamed to match internal structure guidelines. This is an internal cleanup that should make future maintenance easier without changing how users experience notifications.
Original PR description
Move web push code in mail thread. It was added at bottom of file when moving from enterprise at odoo/odoo# XXXX but it could be better located to follow current code location guidelines. Move web push tool into tools directory.
This update simplifies how Odoo's web interface accesses navigation information, making the underlying code easier to maintain. It should not change day-to-day user behavior, but it helps developers build and adjust web features more efficiently.
Original PR description
This commit aims at simplifying the way developers can access
router related information in the webclient. Before this commit,
in components, they had to import the hook `useService` and in
the setup do something like `this.router = useService("router")`. In
services, they had to explicitly declare the dependency to the
router service. In any other functions (like helper functions),
it was a bit painful: the function had to take an env (or the
needed information directly) in arguments, which wasn't ideal.
This commit makes accessing router information easier. The router
service has been removed. Instead, we introduce a `router` object
which can be imported directly from everywhere. Something
similar has already been done for the rpc and orm services.
Part of task 3621046This change simplifies how Odoo's web interface code accesses page navigation information. It is mainly an internal cleanup that should make future development easier and more consistent without changing day-to-day user workflows.
Original PR description
This commit aims at simplifying the way developers can access
router related information in the webclient. Before this commit,
in components, they had to import the hook `useService` and in
the setup do something like `this.router = useService("router")`. In
services, they had to explicitly declare the dependency to the
router service. In any other functions (like helper functions),
it was a bit painful: the function had to take an env (or the
needed information directly) in arguments, which wasn't ideal.
This commit makes accessing router information easier. The router
service has been removed. Instead, we introduce a `router` object
which can be imported directly from everywhere. Something
similar has already been done for the rpc and orm services.
Part of task 3621046