Repository
odoo/odoo · module folder
Module version
2.0
Category
Human Resources/Attendances
Folder size
5.44 MB
License
LGPL-3
Application
Yes
Auto-installable
No
Website
https://www.odoo.com/app/employees
Last tracking update
2026-08-20 10:12:46
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Xavier Morel, Fabien Pinckaers, Raphael Collet, Thibault Delavallée, Odoo Translation Bot, Nicolas Martinelli, Yannick Tivisse, Odoo Online, Jorge Pinna Puissant, Alexandre Kühn, Julien Castiaux, Luis Torres, Sébastien Theys, Tiffany Chang (tic), Gorash, Mathieu Duckerts-Antoine, William Braeckman, Romain Estievenart, Miquel Raïch, Ahmad Khanalizadeh, william-andre, Dossogne Bertrand, Louis Wicket (wil), Gaetan Vanden Bergh (gavb), Yash Vaishnav, Dylan Kiss (dyki), Mayurrajsinh Rathod, Odoo, Xavier Bol (xbo), Walid (wasa), Mélanie, Youssef Bashandy, reka-odoo, jugj-odoo, Tanguy Quéguineur, Martin Trigaux (mat), nihp-odoo, aamo-odoo, rmun-odoo, thle-odoo, Mathieu Coutant, kais-odoo, Abdelrahman Mahmoud (amah), Léo Gizard, ahta, Ezzuldin Zaky (ezza), sben-odoo, Anton Romanova (roan), Bastien PIERRE, Mahdi Alijani (malj), Krzysztof Magusiak (krma), Ajit Singh, krip-odoo, Hazem Ibrahim, Maeva De Keyser (MDEK), Harrison Hutton, Tyler Landivar (tylan), pajo, Bertrand Dossogne, romc-odoo, Ian Cioppa (iacio), adip-odoo, Quentin Colla (qucol), path-odoo, Ayush Modi, lrizzi1, Amr Elkhatieb, assh-odoo, Elliot ELCO, khom-odoo, Ziri, renol-odoo, saurabh, lebm-odoo, Zachary (zavan), Jurgen Gjini, Federico Falcone, Mahmoudk3m, Martin Lefèvre (mlef), karygauss03, Manal El Kaidi (maelk), K, djsh-odoo, Yahia, chpa-odoo, Faruk Avcı, amga-odoo, Kishan (kiga), hamza, SurryaT10, Mélanie Peyrat (mepe), Mohammed Farouk, Nat (naja), Ahmed Naem (Ahnae), Mohamed (moaln), Mohamed-moali, ESTEBAN Lucas, arpi-odoo, satp-odoo
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
hr_attendance_report_theoretical_time, hr_holidays_attendance, hr_timesheet_attendance, test_discuss_full
Description
This module aims to manage employee's attendances.
==================================================

Keeps account of the attendances of the employees on the basis of the
actions(Check in/Check out) performed by them.
       

Code Analysis

Views touched (25)
XML IDNameModelTypeStatus
expected_hours_from_contract_no expected_hours_from_contract_no ir.ui.view qweb New
expected_hours_from_contract_yes expected_hours_from_contract_yes ir.ui.view qweb New
hr_attendance.public_kiosk_mode Attendance Kiosk ir.ui.view qweb New
hr_attendance_employee_simple_form_view hr.attendance.form hr.attendance form Inherits hr_attendance.hr_attendance_view_form
hr_attendance_employee_simple_tree_view hr.attendance.list hr.attendance list New
hr_attendance_management_view_filter hr_attendance_management_view_filter hr.attendance search New
hr_attendance_overtime_rule_view_form hr.attendance.overtime.rule.form hr.attendance.overtime.rule form New
hr_attendance_overtime_rule_view_list hr.attendance.overtime.rule.list hr.attendance.overtime.rule list New
hr_attendance_overtime_ruleset_view_filter hr_attendance_overtime_ruleset_view_filter hr.attendance.overtime.ruleset search New
hr_attendance_overtime_ruleset_view_form hr.attendance.overtime.ruleset.form hr.attendance.overtime.ruleset form New
hr_attendance_overtime_ruleset_view_list hr.attendance.overtime.ruleset.list hr.attendance.overtime.ruleset list New
hr_attendance_view_filter hr_attendance_view_filter hr.attendance search New
hr_attendance_view_form hr.attendance.form hr.attendance form New
hr_attendance_view_graph hr.attendance.graph hr.attendance graph New
hr_attendance_view_pivot hr.attendance.pivot hr.attendance pivot New
hr_department_view_kanban hr.department.kanban.inherit hr.department kanban Inherits hr.hr_department_view_kanban
hr_employee_public_view_form hr.employee.public.form.inherit.attendance hr.employee.public form Inherits hr.hr_employee_public_view_form
hr_employee_search_view hr.employee.search.view hr.employee search Inherits hr.view_employee_filter
hr_employees_view_kanban hr.employee.kanban hr.employee kanban New
res_config_settings_view_form res.config.settings.view.form.inherit.hr.attendance res.config.settings form Inherits base.res_config_settings_view_form
view_attendance_tree hr.attendance.list hr.attendance list New
view_attendance_tree_management hr.attendance.list hr.attendance list New
view_employee_form_inherit_hr_attendance hr.employee hr.employee form Inherits hr.view_employee_form
view_employee_tree_inherit_leave hr.employee.list.leave hr.employee list Inherits hr.view_employee_tree
view_hr_attendance_kanban hr.attendance.kanban hr.attendance kanban New
HTTP endpoints (13)
Route(s)HandlerAuthTypeMethodsFlags
/hr_attendance/create_employee HrAttendance.create_employee public jsonrpc ALL
/hr_attendance/attendance_employee_data HrAttendance.employee_attendance_data public jsonrpc ALL sudo
/hr_attendance/employees_infos HrAttendance.employees_infos public jsonrpc ALL sudo
/hr_attendance/get_employees_without_badge HrAttendance.get_employees_without_badge public jsonrpc ALL
/hr_attendance/kiosk_keepalive HrAttendance.kiosk_keepalive user jsonrpc ALL
/hr_attendance/kiosk_mode_menu/<int:company_id> HrAttendance.kiosk_menu_item_action user http ALL
/hr_attendance/manual_selection HrAttendance.manual_selection public jsonrpc ALL sudo
/hr_attendance/<token> HrAttendance.open_kiosk_mode public http ALL sudo website
/hr_attendance/attendance_barcode_scanned HrAttendance.scan_barcode_with_geolocation public jsonrpc ALL sudo
/hr_attendance/set_settings HrAttendance.set_attendance_settings public jsonrpc ALL
/hr_attendance/set_badge HrAttendance.set_badge public jsonrpc ALL
/hr_attendance/systray_check_in_out HrAttendance.systray_attendance user jsonrpc ALL
/hr_attendance/attendance_user_data HrAttendance.user_attendance_data user jsonrpc ALL
Models touched (11)

New fields (28)
  • attendance_manager_id Many2one → res.users
    export_string_translation=False related='employee_id.attendance_manager_id' args: 'res.users'
  • check_in Datetime
    default=fields.Datetime.now index=True required=True string='Check In' tracking=True
  • check_out Datetime
    string='Check Out' tracking=True
  • color Integer
    compute='_compute_color'
  • date Date
    compute='_compute_date' index=True precompute=True required=True store=True string='Date'
  • department_id Many2one → hr.department
    readonly=True related='employee_id.department_id' string='Department' args: 'hr.department'
  • device_tracking_enabled Boolean
    related='employee_id.company_id.attendance_device_tracking'
  • employee_id Many2one → hr.employee
    default=_default_employee group_expand='_read_group_employee_id' index=True ondelete='cascade' required=True string='Employee' args: 'hr.employee'
  • expected_hours Float
    aggregator='sum' compute='_compute_expected_hours' store=True string='Regular Hours'
  • in_browser Char
    readonly=True string='Browser'
  • in_ip_address Char
    readonly=True string='IP Address'
  • in_latitude Float
    aggregator=None digits=(10, 7) readonly=True string='Latitude'
  • in_location Char
    help='Based on GPS-Coordinates if available or on IP Address'
  • in_longitude Float
    aggregator=None digits=(10, 7) readonly=True string='Longitude'
  • in_mode Selection
    default='manual' readonly=True selection=[('kiosk', 'Kiosk'), ('systray', 'Systray'), ('manual', 'Manual'), ('technical', 'Technical')] string='Mode'
  • is_manager Boolean
    compute='_compute_is_manager'
  • linked_overtime_ids Many2many → hr.attendance.overtime.line
    compute='_compute_linked_overtime_ids' readonly=False args: 'hr.attendance.overtime.line'
  • manager_id Many2one → hr.employee
    comodel_name='hr.employee' export_string_translation=False readonly=True related='employee_id.parent_id'
  • out_browser Char
    readonly=True
  • out_ip_address Char
    readonly=True
  • out_latitude Float
    aggregator=None digits=(10, 7) readonly=True
  • out_location Char
    help='Based on GPS-Coordinates if available or on IP Address'
  • out_longitude Float
    aggregator=None digits=(10, 7) readonly=True
  • out_mode Selection
    default='manual' readonly=True selection=[('kiosk', 'Kiosk'), ('systray', 'Systray'), ('manual', 'Manual'), ('technical', 'Technical'), ('auto_check_out', 'Automatic Check-Out')]
  • overtime_hours Float
    compute='_compute_overtime_hours' store=True string='Worked Extra Hours'
  • overtime_status Selection
    compute='_compute_overtime_status' readonly=False selection=[('to_approve', 'To Approve'), ('approved', 'Approved'), ('refused', 'Refused')] store=True tracking=True
  • validated_overtime_hours Float
    compute='_compute_validated_overtime_hours' readonly=True store=True string='Validated Extra Hours' tracking=True
  • worked_hours Float
    compute='_compute_worked_hours' readonly=True store=True string='Worked Hours'
Public methods (11)
  • action_approve_overtime(self)
  • action_in_attendance_maps(self)
  • action_out_attendance_maps(self)
  • action_refuse_overtime(self)
  • action_try_kiosk(self)
  • copy(self, default=None)
  • create(self, vals_list)
    @api.model_create_multi
  • get_kiosk_url(self)
  • has_demo_data(self)
    @api.model
  • unlink(self)
  • write(self, vals)

New fields (11)
  • amount_rate Float
    default=1.0 required=True args: 'Overtime pay rate'
  • company_id Many2one
    related='employee_id.company_id'
  • date Date
    index=True required=True string='Day'
  • duration Float
    default=0.0 required=True string='Extra Hours'
  • employee_id Many2one → hr.employee
    index=True ondelete='cascade' required=True string='Employee' args: 'hr.employee'
  • is_manager Boolean
    compute='_compute_is_manager'
  • manual_duration Float
    compute='_compute_manual_duration' readonly=False store=True string='Extra Hours (encoded)'
  • rule_ids Many2many → hr.attendance.overtime.rule
    string='Applied Rules' args: 'hr.attendance.overtime.rule'
  • status Selection
    compute='_compute_status' precompute=True readonly=False required=True store=True args: [('to_approve', 'To Approve'), ('approved', 'Approved'), ('refused', 'Refused')]
  • time_start Datetime
    string='Start'
  • time_stop Datetime
    string='Stop'
Public methods (3)
  • action_approve(self)
  • action_refuse(self)
  • write(self, vals)

New fields (18)
  • amount_rate Float
    default=1.0 args: 'Rate'
  • base_off Selection
    default='quantity' help="Base for overtime calculation.\nUse 'Quantity' when overtime hours are those in excess of a certain amount per day/week.\nUse 'Timing' when overtime hours happen on specific days or at specific times" required=True string='Based Off' args: [('quantity', 'Quantity'), ('timing', 'Timing')]
  • company_id Many2one
    related='ruleset_id.company_id'
  • description Html
  • employee_tolerance Float
  • employer_tolerance Float
  • expected_hours Float
    string='Usual work hours'
  • expected_hours_from_contract Boolean
    default=True help='The attendance can go into negative extra hours to represent the missing hours compared to what is expected if the Absence Management setting is enabled.' args: 'Hours from employee schedule'
  • information_display Char
    compute='_compute_information_display' args: 'Information'
  • name Char
    required=True
  • paid Boolean
    args: 'Pay Extra Hours'
  • quantity_period Selection
    default='day' args: [('day', 'Day'), ('week', 'Week')]
  • resource_calendar_id Many2one → resource.calendar
    domain=[('flexible_hours', '=', False)] string='Schedule' args: 'resource.calendar'
  • ruleset_id Many2one → hr.attendance.overtime.ruleset
    index=True required=True args: 'hr.attendance.overtime.ruleset'
  • sequence Integer
    default=10
  • timing_start Float
    default=0 args: 'From'
  • timing_stop Float
    default=24 args: 'To'
  • timing_type Selection
    default='work_days' args: [('work_days', 'On any working day'), ('non_work_days', 'On any non-working day'), ('leave', 'When employee is off'), ('schedule', 'Outside of a specific schedule')]
Public methods (0)

No public methods.

New fields (8)
  • active Boolean
    default=True readonly=False
  • company_id Many2one → res.company
    default=<expr> args: 'res.company', 'Company'
  • country_id Many2one → res.country
    default=<expr> args: 'res.country'
  • description Html
  • name Char
    required=True
  • rate_combination_mode Selection
    default='max' help='Controls how the rates from the different rules that apply are combined.\n Max: use the highest rate. (e.g.: combined for 150% and 120 = 150%)\n Sum: sum the *extra* pay (i.e. above 100%).\n e.g.: combined rate for 150% & 120% = 100% (baseline) + (150-100)% + (120-100)% = 170%\n' required=True string='Rate Combination Mode' args: [('max', 'Maximum Rate'), ('sum', 'Sum of all rates')]
  • rule_ids One2many → hr.attendance.overtime.rule
    args: 'hr.attendance.overtime.rule', 'ruleset_id'
  • rules_count Integer
    compute='_compute_rules_count'
Public methods (1)
  • action_regenerate_overtimes(self)

New fields (17)
  • attendance_ids One2many → hr.attendance
    groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user' args: 'hr.attendance', 'employee_id'
  • attendance_manager_id Many2one → res.users
    domain="[('share', '=', False), ('company_ids', 'in', company_id)]" groups='hr_attendance.group_hr_attendance_officer' help='The user set in Attendance will access the attendance of the employee through the dedicated app and will be able to edit them.' readonly=False store=True string='Attendance Approver' args: 'res.users'
  • attendance_state Selection
    compute='_compute_attendance_state' groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user' selection=[('checked_out', 'Checked out'), ('checked_in', 'Checked in')] string='Attendance Status'
  • display_attendances Boolean
    compute='_compute_display_attendances'
  • display_extra_hours Boolean
    related='company_id.hr_attendance_display_overtime'
  • hours_last_month Float
    compute='_compute_hours_last_month'
  • hours_last_month_display Char
    compute='_compute_hours_last_month' groups='hr.group_hr_user'
  • hours_last_month_overtime Float
    compute='_compute_hours_last_month'
  • hours_previously_today Float
    compute='_compute_hours_today' groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user'
  • hours_today Float
    compute='_compute_hours_today' groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user'
  • last_attendance_id Many2one → hr.attendance
    compute='_compute_last_attendance_id' groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user' store=True args: 'hr.attendance'
  • last_attendance_worked_hours Float
    compute='_compute_hours_today' groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user'
  • last_check_in Datetime
    groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user' related='last_attendance_id.check_in' store=True tracking=False
  • last_check_out Datetime
    groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user' related='last_attendance_id.check_out' store=True tracking=False
  • overtime_ids One2many → hr.attendance.overtime.line
    groups='hr_attendance.group_hr_attendance_officer,hr.group_hr_user' args: 'hr.attendance.overtime.line', 'employee_id'
  • ruleset_id Many2one
    groups='hr.group_hr_manager' inherited=True readonly=False related='version_id.ruleset_id'
  • total_overtime Float
    compute='_compute_total_overtime'
Public methods (6)
  • action_archive(self)
  • action_open_last_month_attendances(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_overtime_data(self, domain=None, employee_id=None)
    @api.model
  • open_barcode_scanner(self)
  • write(self, vals)

New fields (11)
  • attendance_manager_id Many2one
    groups='hr_attendance.group_hr_attendance_officer' related='employee_id.attendance_manager_id'
  • attendance_state Selection
    groups='hr_attendance.group_hr_attendance_officer' readonly=True related='employee_id.attendance_state'
  • display_attendances Boolean
    related='employee_id.display_attendances'
  • display_extra_hours Boolean
    related='company_id.hr_attendance_display_overtime'
  • hours_last_month Float
    related='employee_id.hours_last_month'
  • hours_last_month_overtime Float
    related='employee_id.hours_last_month_overtime'
  • hours_today Float
    groups='hr_attendance.group_hr_attendance_officer' readonly=True related='employee_id.hours_today'
  • last_attendance_id Many2one
    groups='hr_attendance.group_hr_attendance_officer' readonly=True related='employee_id.last_attendance_id'
  • last_check_in Datetime
    groups='hr_attendance.group_hr_attendance_officer' related='employee_id.last_check_in'
  • last_check_out Datetime
    groups='hr_attendance.group_hr_attendance_officer' related='employee_id.last_check_out'
  • total_overtime Float
    readonly=True related='employee_id.total_overtime'
Public methods (1)
  • action_open_last_month_attendances(self)

New fields (1)
  • ruleset_id Many2one → hr.attendance.overtime.ruleset
    default=<expr> domain=_domain_current_countries groups='hr.group_hr_manager' tracking=True args: 'hr.attendance.overtime.ruleset'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • lazy_session_info(self)
    @api.model

New fields (15)
  • absence_management Boolean
    default=False string='Absence Management'
  • attendance_barcode_source Selection
    default='front' string='Barcode Source' args: [('scanner', 'Scanner'), ('front', 'Front Camera'), ('back', 'Back Camera')]
  • attendance_device_tracking Boolean
    default=False string='Device & Location Tracking'
  • attendance_from_systray Boolean
    default=False string='Attendance From Systray'
  • attendance_kiosk_delay Integer
    default=10
  • attendance_kiosk_key Char
    copy=False default=<expr> groups='hr_attendance.group_hr_attendance_user'
  • attendance_kiosk_mode Selection
    default='barcode_manual' string='Attendance Mode' args: [('barcode', 'Barcode / RFID'), ('barcode_manual', 'Barcode / RFID and Manual Selection'), ('manual', 'Manual Selection')]
  • attendance_kiosk_url Char
    compute='_compute_attendance_kiosk_url'
  • attendance_kiosk_use_pin Boolean
    string='Employee PIN Identification'
  • attendance_overtime_validation Selection
    default='no_validation' string='Extra Hours Validation' args: [('no_validation', 'Automatically Approved'), ('by_manager', 'Approved by Manager')]
  • auto_check_out Boolean
    default=False string='Automatic Check Out'
  • auto_check_out_tolerance Float
    default=2 export_string_translation=False
  • hr_attendance_display_overtime Boolean
    string='Display Extra Hours'
  • overtime_company_threshold Integer
    default=0 string='Tolerance Time In Favor Of Company'
  • overtime_employee_threshold Integer
    default=0 string='Tolerance Time In Favor Of Employee'
Public methods (1)
  • write(self, vals)

New fields (14)
  • absence_management Boolean
    readonly=False related='company_id.absence_management'
  • attendance_barcode_source Selection
    readonly=False related='company_id.attendance_barcode_source'
  • attendance_device_tracking Boolean
    readonly=False related='company_id.attendance_device_tracking'
  • attendance_from_systray Boolean
    readonly=False related='company_id.attendance_from_systray'
  • attendance_kiosk_delay Integer
    readonly=False related='company_id.attendance_kiosk_delay'
  • attendance_kiosk_mode Selection
    readonly=False related='company_id.attendance_kiosk_mode'
  • attendance_kiosk_url Char
    related='company_id.attendance_kiosk_url'
  • attendance_kiosk_use_pin Boolean
    readonly=False related='company_id.attendance_kiosk_use_pin'
  • attendance_overtime_validation Selection
    readonly=False related='company_id.attendance_overtime_validation'
  • auto_check_out Boolean
    readonly=False related='company_id.auto_check_out'
  • auto_check_out_tolerance Float
    readonly=False related='company_id.auto_check_out_tolerance'
  • hr_attendance_display_overtime Boolean
    readonly=False related='company_id.hr_attendance_display_overtime'
  • overtime_company_threshold Integer
    readonly=False string='Tolerance Time In Favor Of Company'
  • overtime_employee_threshold Integer
    readonly=False string='Tolerance Time In Favor Of Employee'
Public methods (3)
  • get_values(self)
    @api.model
  • regenerate_kiosk_key(self)
  • set_values(self)

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…