Skip to Content
Menú
This question has been flagged
2 Respostes
467 Vistes

My organization is loose with lunch breaks and doesn't require employees to clock in and out for lunch. currently HR is manually deducting 30 minutes from employees who work 8 hours in a day. Is there a way to simplify this operation so the deduction happens automatically?

Avatar
Descartar
Best Answer

Yes, there’s a way to make this easier so HR doesn’t have to manually deduct 30 minutes for lunch every day. Odoo can handle this automatically depending on how your setup is built. Here are a few ways to do it:

1. If you’re using fixed working hours (working schedule)

One of the easiest ways is to include the lunch break in the employee’s working schedule. You can do this by going to:


Employees > Configuration > Working Time

There, open the working schedule you use (like “Standard 8 Hours”) and split the working hours to include the lunch break. For example:

  • 08:00 to 12:00
  • 12:30 to 16:30

This setup automatically deducts 30 minutes from the total hours per day, without requiring employees to clock in or out for lunch. Odoo simply counts the working blocks.

This works really well if you’re also using Payroll or want consistent reporting.

2. If you’re using the Attendance module (clock in/out)

If your team clocks in and out using the Attendance app but doesn’t log lunch breaks, you can still automate the 30-minute deduction.

You have two ways to do this:

a. With Odoo Studio (Enterprise):

You can create a new computed field that calculates “Net Working Hours” by subtracting 0.5 hours when the total hours exceed a certain amount, like 6 hours.

Example:


if rec.worked_hours > 6: rec.net_hours = rec.worked_hours - 0.5 else: rec.net_hours = rec.worked_hours

b. With a custom module (Community or advanced logic):

If you're not using Studio or need more control, a developer can create a small module to handle the same logic automatically during attendance calculations.

3. If you’re using Timesheets

If your company works mainly through Timesheets, you can set up a rule where if someone logs more than 8 hours in a day, 30 minutes are deducted automatically or flagged for review. But this is more manual unless customized.

Avatar
Descartar
Autor

Thank you for the through answer.

My company want's to do it through fixed working hours, but is partially using all three in various ways. The the attendance module activated and is only partially using it along with timesheets. It appears the lunch breaks are already in the default working schedule, but it isn't being used much by the system.

Am I correct in my assumption that this is due to the attendance module being active and prioritized over the working schedule?

Best Answer

Hi,


You can set the employee's working time as follows.


Go to the employee working schedule.

Add the employee schedule as follows.


Hope it helps


Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de nov. 16
3511
1
de jul. 15
3393
1
de març 15
4536
1
de jul. 25
440
1
de jul. 25
815