Ir al contenido
Menú
Se marcó esta pregunta
3 Respuestas
162 Vistas

Hello Community,


I need some help with the Time Off module in Odoo.


In my country, when an employee takes annual leave (or any type of leave), weekends are also counted as part of the leave.


For example:


An employee has 30 days annual leave.


He requests leave for 7 days (Monday to Sunday).


In Odoo, only 5 days are deducted, because Saturday and Sunday are not counted.


But in reality, in my country, it should deduct the full 7 days.


So instead of 25 days remaining, it should show 23 days remaining.


👉 How can I configure or customize Odoo so that weekends are also deducted from annual leave balance?


Thanks in advance for any guidance.

Avatar
Descartar
Autor

Thanks a lot, your solution worked perfectly for the Time Off calculation 🙏

I have one more question:

If I configure weekends as working days (so that they are deducted from annual leave), will this affect Payroll calculations?

For example, when I generate payslips, will Odoo calculate the salary correctly, or will it consider weekends as actual working days and change the payroll result?

Thanks again for your support.

Mejor respuesta

Hi,


This is a common issue when implementing Time Off in Odoo, because by default Odoo excludes weekends and public holidays when computing leave days. By default, only working days are deducted from the allocation balance.


Since in your country all calendar days (including weekends) should count as leave, you’ll need to change how Odoo calculates leave days.


If you don’t want to customize code:


    Change the employee’s resource calendar to include weekends as "working days".


    For example, set Saturday and Sunday as working days (with zero working hours if you want).


    This way, Odoo will count them as part of leave.


Downside: Attendance reports, scheduling, and timesheets will now treat weekends as workdays, which may not reflect reality.


Otherwise, you need to customize the required flow.


Hope it helps

Avatar
Descartar
Mejor respuesta

Odoo’s Time Off module calculates leave days based on working calendars, so weekends are excluded by default unless you configure a 7-day calendar or adjust the module’s Python logic (Wikipedia: Odoo). To ensure leave requests deduct weekends, you can customize the resource calendar or apply code changes to count all calendar days. Just as systems adapt to local rules, even food chains update offerings to meet regional habits, and menus like the raising canes-menu reflect that flexibility in practice — https://raisingcanes-menus.com/the-3-finger-combo/

Avatar
Descartar
Mejor respuesta

Odoo’s Time Off module follows working calendars, so weekends aren’t deducted unless you adjust the resource calendar or customize the leave logic (source: Wikipedia on Odoo). To deduct weekends, you can configure a 7-day workweek or tweak the Python code in the module. In the same way businesses adapt systems to local needs, even menus like the olive garden menue evolve with preferences — see more at https://olivegardenmenue.com/olive-garden-lunch-menu/.

Avatar
Descartar