Thursday, December 7, 2023
4 changes · master
Enhancements to existing features
Time off allocations now use a single description field instead of separate public and private descriptions. This reduces confusion and fixes related issues while preserving appropriate access because employees cannot view other people's allocations.
Original PR description
Change affects name field in hr_leave_allocation. So far there were two fields - name and private_name. The idea behind it was to prevent displaying description of allocation to users that are not supposed to see it (potentially private information). It wasn't necessary as users doesn't have access to others' allocations. It was simplified - now there's only one field (name). That also solves problems reported in two tasks. task-3598745 task-3552639 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
Warehouse users can now update a package's location directly from its form or by dragging it to another location. Packages are easier to manage because they are grouped and filtered by location, and package moves are recorded in move history for better traceability.
Original PR description
This commit adds the ability to edit the location_id of a package by either changing the field in the form or by dragging the package to another location. The packages are now grouped by location by default and filtered by internal locations or empty locations. When a package is moved, a move is created for each of it quants to reflect in Moves History. Also, a kanban view is added to reflect package contents when on mobile as its better on the smaller screen. TaskId:3479578 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Timesheet approval reminder emails are now sent only to relevant approvers when there are timesheets waiting for their validation. Monthly reminders also now cover the correct previous-month period and show the correct date range, reducing unnecessary or misleading emails.
Original PR description
**prevent cron from sending approver reminder if no timesheet assigned to approver Send the reminder email if: - there are timesheets to validate - AND if the user is set as either the manager or timesheet approver of an employee with timesheets left to be validated - OR if the said employee has no manager or timesheet approver set Also fixed the monthly reminder (it was sending the last week unvalidated action) Also fixed the date displayed in the mail to be for months: - from the first of the previous month the the last day of the previous month Task-3624610** Replaced by this PR in stable: https://github.com/odoo/enterprise/pull/52355 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Code cleanup and technical improvements
This update simplifies how Odoo's web framework makes server requests, making the code easier for developers to use and maintain. The change is mostly internal, but it touches many apps and may slightly affect how background requests behave when screens are closed or changed.
Original PR description
This PR aims at simplifying the way developpers can do rpcs with our framework. Before this commit, in components, they had to import the hook `useService`, and in the setup do something like…
This PR aims at simplifying the way developpers can do rpcs
with our framework. Before this commit, in components, they had to
import the hook `useService`, and in the setup do something like
`this.rpc = useService("rpc")`, and then use `this.rpc` where they
wanted. In services, they had to explicitely declare the dependency
to the rpc service. In any other functions (like helper functions),
it was a bit painful: the function had to take an env (or the rpc
function directly) in arguments, which wasn't ideal.
This PR makes doing rpcs easier. The rpc service service has
been removed. The `jsonrpc` function has been renamed into `rpc`
(and the file `rpc_service` into `rpc`). One can now simply do
`import { rpc } from "@web/core/network/rpc"` and use `rpc` where
he wants.
Note that this change has a (maybe) not insignificant side-effect.
We no longer have the "protection" on rpc. Before, when a component
used `useService("rpc")`, the returned function was tied to that
component instance. If the component was destroyed when calling the
function, it crashed (s.t. a destroyed component didn't do rpc). If
the component was destroyed during the rpc, the promise was left
pending forever (s.t. subsequent callbacks weren't executed). This
protection was sometimes annoying, and people started to bypass it
by directly calling `env.services.rpc` (i.e. a version which isn't
tied to the component). We believe this protection is not really
necessary. In the future, we may introduce an `alive` function to
wrap rpc calls, and use it at some places where it is indeed
necessary (i.e. move it user-space instead of enforced by the
framework).
Part of task~3621046