Daily updates from Odoo
Thursday, July 7, 2022
3 changes · master
Resolved issues and error corrections
This fixes a test setup issue by setting an employee's creation date correctly when the employee is created. It helps ensure project scheduling tests use the employee's own working schedule instead of incorrectly falling back to the company schedule.
Original PR description
Before this commit, the `create_date` field of the employee used in the unit test is updated via a sql query after creating that employee. By doing that, the cache is not invalidated and so the `create_date` still remains the current date and so the schedule will not based to the working schedule of that employee since it will be considered as not working to the company before the current date, and so the working schedule of the company will be used instead. This commit updates the `create_date` directly during the creation of that employee and avoid doing a sql query for that. By doing this, the employee will be considered as working on the company since the `create_date` is before the dates to plan the tasks and so the working schedule will not be used.
This update makes automated checks for Field Service task analysis more reliable when values include extra decimal places. It reduces false test failures caused by tiny rounding differences, helping maintain confidence in reporting accuracy.
Original PR description
Before this commit, the test to compare the values in Fsm Task Analysis with the values stored in the task sometimes fails because a float value could have more than 2 decimals and so it will consider as is not equal to the other value. This commit replaces the `assertDict` by `assertEqual` for each key value in the both dictionary and in that assertEqual the `float_compare` is used to compare the both value until the 2 first decimals. X-original-commit: 1245fe41670f7
This fix ensures Studio applies the correct styling to its current kanban views and report screens. Users opening Studio from kanban views or reports should see a properly arranged layout instead of visual inconsistencies.
Original PR description
https://github.com/odoo/odoo/pull/95387