Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
2363 Näkymät

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
Hylkää
Paras vastaus

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
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
huhtik. 21
3818
0
huhtik. 21
2326
1
kesäk. 23
3131
1
tammik. 23
2924
0
syysk. 22
2629