Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2393 มุมมอง

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")



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
เม.ย. 21
3867
0
เม.ย. 21
2349
1
มิ.ย. 23
3162
1
ม.ค. 23
2952
0
ก.ย. 22
2671