Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
1292 Lượt xem

Hello,

I wanted to know if it's possible to check-in / check-out in the Attendance application using the API ? The goal would be to allow users to check in / check out through custom external application (company website, mobile app, ...)

Regards

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you very much for the answer, I think I have everything I need to start 

Câu trả lời hay nhất

Hi,

Yes, it's possible to check-in and check-out in the Attendance module via API.

You can achieve this by interacting with the hr.attendance model using either XML-RPC or JSON-RPC. You'd typically use the attendance_manual method to toggle between check-in and check-out states based on the current user's last attendance record.

Another approach is to create a custom controller in Odoo that exposes an endpoint (e.g., /api/attendance/checkin) which your external app (mobile, website, etc.) can call. This gives you more flexibility, especially if you want to apply additional business logic or handle authentication differently.

Make sure that the external application authenticates the user properly and has access rights to create or update records in the hr.attendance model.

Hope this helps!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 8 25
1541
3
thg 7 25
2268
1
thg 7 25
1807
0
thg 1 25
1402
1
thg 12 24
1803