Sunday, June 30, 2024
2 changes · saas-17.3
Miscellaneous changes
### Steps to reproduce: - Create and mark as to do a delivery order for a partner with a move: - 2 x Product P - Set the quantity of the move to 1 - Create and confirm a batch transfer containing your picking - Validate the batch transfer and create a backorder #### > The picking is removed from the batch ### Cause of the issue: The pickings are removed from the batch by these lines: https://github.com/odoo/odoo/blob/b4872364f9f8926bbf5b843db014f33652124cb9/addons/stock_picking_ba
Original PR description
### Steps to reproduce: - Create and mark as to do a delivery order for a partner with a move: - 2 x Product P - Set the quantity of the move to 1 - Create and confirm a batch transfer containing your picking - Validate the batch transfer and create a backorder #### > The picking is removed from the batch ### Cause of the issue: The pickings are removed from the batch by these lines: https://github.com/odoo/odoo/blob/b4872364f9f8926bbf5b843db014f33652124cb9/addons/stock_picking_batch/models/stock_picking.py#L141-L145 However, they should only be removed if at least one of the pickings is not backordered. opw-4001981 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#171218
Previously, the end-time of 'date_to' for leave requests was consistently set to the end of the day (i.e., 23:59), which was only desirable for public holidays (ref.1). However, this caused undesired behavior in other modules, such as the appointment module. The behavior was tracked down to an onchnge method (ref.2) supposed to be triggered only if date_from has changed. What happend instead that both updates: updating date_from as well as date_to, triggered the onchange. With this comm
Original PR description
Previously, the end-time of 'date_to' for leave requests was consistently set to the end of the day (i.e., 23:59), which was only desirable for public holidays (ref.1). However, this caused undesired…
Previously, the end-time of 'date_to' for leave requests was consistently
set to the end of the day (i.e., 23:59), which was only desirable for
public holidays (ref.1). However, this caused undesired behavior in other
modules, such as the appointment module. The behavior was tracked down
to an onchnge method (ref.2) supposed to be triggered only if date_from
has changed. What happend instead that both updates:
updating date_from as well as date_to, triggered the onchange.
With this commit we modify the datetime_field, so it only triggers the
date_from update when the date_from has changed. So it would behave in the
following way:
1) date_from field has changed -> will trigger the onchange (setting date_to)
date_from: Monday 10:00 -> Monday 12:00
date_to: Monday 18:00 -> Monday 20:00 (results in Monday **23:59**)
2) date_from field hasn't changed (and date_to has changed)-> won't trigger the onchange
date_from: Monday 10:00 -> Monday 10:00
date_to: Monday 18:00 -> Monday 20:00 (results in Monday **20:00**)
(ref.1)
[IMP] resource: compute date_to for better ux
https://github.com/odoo-dev/odoo/commit/e0f3dd9e01d91896f1c00fb5cb3ce5c821912d03
https://github.com/odoo/odoo/pull/115688
(ref.2)
ResourceCalendarLeaves._compute_date_to
https://github.com/odoo/odoo/blob/6ae13a697bfd685366d10aa763de1bd6f2bd3e43/addons/resource/models/resource_calendar_leaves.py#L53-L61
[Reproduce]
- Install appointment
- Create New Resource Time Off (Appointments/ Configuration/ Resource Leaves)
- change time of "End Date"
- BUG: time sets itself to 23:59
opw-3841275
Forward-Port-Of: odoo/odoo#160665