Daily updates from Odoo
Tuesday, April 1, 2025
4 changes · 18.0
Enhancements to existing features
Bank statement imports now create related accounting entries in batches instead of one by one. This significantly reduces import times for large statement files, helping finance teams process bank data faster.
Original PR description
When importing statements the creation of the `account_move_lines` in `account_bank_statement_line.create` takes a lot of time. One of the reasons for that is that the amls are created for each st_line via the one2many field assignation. This commit speeds up this process by creating all the amls at once after looping through `st_lines`. Batching the amls creation like that leads to a noticeable speedup when importing a lot of statements. speedup Importing bank_statement file in Odoo 18.0. | Number of lines_to_create | Before PR | After PR | |:-------------------------:|:----------:|:--------:| | 100 | 5.24s | 2.78s | | 500 | 22.72s | 11.47s | | 1000 | 44.66s | 21.73s | | 3000 | 2min15s | 1min05s | --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Resolved issues and error corrections
Leave requests for employees on flexible working schedules now correctly exclude public holidays from the counted absence duration. This prevents employees from losing leave days when a public holiday falls within their approved time off.
Original PR description
### Steps to reproduce: - Create a flexible working schedule - Assign this working schedule to one of the employees - Create a public holiday for the flexible calendar - Create a leave for the flexible employee where the public holiday will be during his leave - Notice the duration of the leave ### Cause: This is happening because when calculating the leave duration for a flexible resource we are counting each day between 'leave.date_from' and 'leave.date_to' as the flexible employee should be available everyday. ### Fix: We are now checking if there is a public holiday in the middle of the leave and if so we exclude these days from the leave duration. opw-4568569
Saved filters that use dynamic values, such as the current user, no longer cause an error when opening JSON data views. This keeps default filters working reliably across sales and other screens that depend on them.
Original PR description
"/json" path not work if the current domain contains dynamic data like "uid", replace ast evaluation by safe_eval to pass the context
Steps:
- Open sales
- Save current filter as a custom default filter
- My quotations: [("user_id", "=", uid)]
- Switch to json path
Actual result:
- Internal server error
Expected result:
- No error, json data is loaded with the domain
opw-4648527This fix avoids unnecessary reading of all sales spreadsheets when users work with sale order spreadsheets. It improves performance without changing what users can access or how sales order security rules apply.
Original PR description
Users don't need to be able to read all spreadsheet. It hurts performance. Task: 4656165