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

Hello everyone , I am using odoo 13.

In the HR  attendance module ,  employees in the system can check in and check out multiple times per day. I want to get the first check-in to the system for a specific employee per day. I have added new fields to hr.attendance so far, but I don't know what to do next.


class HrAttendance(models.Model):
_inherit = 'hr.attendance'

    first_sign_in = fields.Datetime(string="First Check In", readonly="1")



Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

If you need to mark it in the attendance model itself, then add a computed boolean in hr.attendance model, define compute function , sort and get the lowest time of the day and set it a first attendance.


Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 21
3809
0
thg 4 21
2316
1
thg 6 23
3126
1
thg 1 23
2917
0
thg 9 22
2624