跳至內容
選單
此問題已被標幟
1 回覆
2339 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
4月 21
3784
0
4月 21
2273
1
6月 23
3110
1
1月 23
2901
0
9月 22
2594