跳至内容
菜单
此问题已终结
2 回复
582 查看

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?

形象
丢弃
最佳答案

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.

形象
丢弃
编写者

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?

最佳答案

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


形象
丢弃
相关帖文 回复 查看 活动
1
11月 16
3606
1
7月 15
3478
1
3月 15
4618
1
8月 25
172
1
7月 25
538