Skip to content
Snippets Groups Projects
Unverified Commit b13a2202 authored by Robot Odoo's avatar Robot Odoo Committed by GitHub
Browse files

[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
parents 262e0010 9c1b9324
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment