Friday, June 21, 2024
2 changes · saas-17.1
Resolved issues and error corrections
This fix prevents appointment-related resource time off end times from being automatically changed to 23:59 when only the end time is edited. It keeps the automatic end-of-day behavior only when the start date changes, preserving the intended flow for public holidays while avoiding unwanted scheduling changes elsewhere.
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-3841275This fixes an issue where optional add-on products appeared unavailable during mobile self-order checkout, even when they should have been available. Customers can now correctly select related optional products based on the same availability rules used elsewhere in Point of Sale.
Original PR description
To reproduce the bug follow the instructions: - Have pos and sales app installed - Go to pos app setting and enable is a Restorant setting - Back to the dashboard you should have a new shop called…
To reproduce the bug follow the instructions:
- Have pos and sales app installed
- Go to pos app setting and enable is a Restorant setting
- Back to the dashboard you should have a new shop called Restorant
- Go to the products from and create a product ('pencil' for instance), make it available in pos and in self-order and assign to it a category
- Add another product ('paper') with the same options in pos side and assign to it the same category, then add the first product ('pencil') to its optional product in sales section
- Back to pos dashboard open a sessing in Restorant shop then go back again to the dashboard
- Click on the tree dots on the top right of the Restorant shop block and click on the mobile view
- Create a new order adding 'paper' to the command then go to checkout
Now the optional product 'pencil' should be shown but it's unavailable.
A feature was added in Odoo 17.1 and newer for the availibility of the product on the point of sale app. It filter the product based on the availability hours of its categories. This brought changes to ProductCard component witch (you can check product_list_page) in pos_self_order modul for that. The thing is that these change wasn't made is pos_self_order_sale modul witch made the product always shown as unavailable.
opw-3977238