Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2345 Zobrazení

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



Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
dub 21
3788
0
dub 21
2292
1
čvn 23
3115
1
led 23
2904
0
zář 22
2610