-
- Downloads
[FIX] hr_holidays: fasten creation of leaves by company
When creating a leave, we usually check/create activities for the concerned users, this is fine when creating one leave. However it starts to become a problem when trying to create leaves in batch using the by company or by department holiday_type as the number of leaves created in batch can become quite big. Now when we create leaves in batch, we do not check for the activities, which will fasten a lot the creation. Another problem is that when someone defined a leave on the very day you want to create such a request, then it will crash, this can lead to waste of time and resources. Now we raise an error before trying to create the leaves in case of conflict. NB: Tested with +- 320 records, took 20 seconds instead of more than 10 minutes. Task: 1934383 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr closes odoo/odoo#30625
Loading
Please register or sign in to comment