Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Attendances

Entity: hr.employee

Compute Method: _compute_last_attendance_id

Inputs Method Outputs
  • id
for employee in self:
            employee.last_attendance_id = self.env['hr.attendance'].search([
                ('employee_id', '=', employee.id),
            ], order="check_in desc", limit=1)

Back to entity