Thursday, October 19, 2023
3 changes
Resolved issues and error corrections
This fixes an access issue that could stop some HR users from opening employee contract forms. The salary attachment button is now only shown to users with the right payroll permission, preventing confusing errors and improving day-to-day HR workflow reliability.
Original PR description
Before this commit, the button ``action_open_salary_attachments`` on the contract form view would cause the error ``EvalError: Can not evaluate python expression: (bool(salary_attachments_count == 0))`` because the button would use the field ``salary_attachments_count`` in its invisible attribute. However, not all all users have the access rights to this field. With this commit, the button's access rights are limited to those of ``salary_attachments_count``, namely ``group_hr_payroll_user``
This update changes several business apps to use Odoo's controlled randomization tool when creating sample or test data. This helps ensure generated data is repeatable, making testing and troubleshooting more reliable without affecting day-to-day users.
Original PR description
*: - appointment - knowledge - planning - sale_subscription Before this commit, the populate files for the listed modules were calling the random python library. As we don't want non-deterministic populate, this import has been changed to use the odoo Random tool which allows deterministic randomization through seeds.
Rental products added to an empty cart now use the correct rental dates before checking stock availability. This prevents customers from proceeding with unavailable rentals and disables checkout when the cart cannot be fulfilled for the selected dates.
Original PR description
Before this commit, when adding a rental storable product to an empty cart, the check of stock availability was wrong because no dates were specified. This commit makes sure the cart has dates when adding a rental product to it. The check for the rental availabilities always use the dates from the cart. Therefore, the arguments of `_is_valid_renting_dates` are removed. task-3537684 See also: https://github.com/odoo/odoo/pull/137844