Skip to content
Health
100/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by25/25
    19 modules depend on it
  • Maturity25/25
    In 15 Odoo series since 6.1

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
19
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
LGPL-3
No conflicts with its dependencies
Folder size
15.03 MB
Module directory on disk
Code analysis 0 migration notes 33 models 67 views 3 HTTP endpoints

Description

Dependencies

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 67

XML IDNameModelTypeStatus
discuss_channel_view_form discuss.channel.view.form.inherit.hr discuss.channel form Inherits mail.discuss_channel_view_form
hr_contract_template_form_view hr.contract.template.form hr.version form New
hr_contract_template_list_view hr.contract.template.list hr.version list New
hr_contract_type_view_form hr.employee.type form New
hr_contract_type_view_tree hr.employee.type list New
hr_department_hierarchy_view hr.departmnent.view.hierarchy hr.department New
hr_department_view_kanban hr.department.kanban hr.department kanban New
hr_departure_reason_view_form hr.departure.reason form New
hr_departure_reason_view_list hr.departure.reason list New
hr_employee_create_version_wizard_view_form hr.employee.create.version.wizard.form hr.employee.create.version.wizard form New
hr_employee_departure_view_form hr.employee.departure.view.form hr.employee.departure form New
hr_employee_hierarchy_view hr.employee.view.hierarchy hr.employee New
hr_employee_list_activites_view hr.employee.list.activites.view hr.employee list New
hr_employee_list_view hr.employee.list hr.employee list New
hr_employee_plan_activity_summary hr_employee_plan_activity_summary ir.ui.view qweb New
hr_employee_public_hierarchy_view hr.employee.public.hierarchy.view hr.employee.public New
hr_employee_public_view_form hr.employee.public.form hr.employee.public form New
hr_employee_public_view_kanban hr.employee.kanban hr.employee.public kanban New
hr_employee_public_view_search hr.employee.search hr.employee.public search New
hr_employee_public_view_tree hr.employee.list hr.employee.public list New
hr_employee_view_activity hr.employee.activity hr.employee activity New
hr_employee_view_graph hr.employee.view.graph hr.employee graph New
hr_employee_view_pivot hr.employee.view.pivot hr.employee pivot New
hr_job_view_kanban hr.job.kanban hr.job kanban New
hr_kanban_view_employees hr.employee.kanban hr.employee kanban New
hr_version_graph_view hr.version.graph hr.version graph New
hr_version_list_view hr.version.list hr.version list New
hr_version_list_view_enhanced hr.version.list.view.enhanced hr.version list New
hr_version_pivot_view hr.version.pivot hr.version pivot New
hr_version_search_view hr.version.search hr.version search New
hr_version_search_view_enhanced hr.version.search.view.enhanced hr.version search New
hr_work_location_form_view hr.work.location.view.form hr.work.location form New
hr_work_location_tree_view hr.work.location.view.list hr.work.location list New
mail_activity_plan_template_view_form mail.activity.plan.template.view.form.inherit.hr mail.activity.plan.template form Inherits mail.mail_activity_plan_template_view_form
mail_activity_plan_view_form mail.activity.plan.view.form.inherit.hr mail.activity.plan form Inherits mail.mail_activity_plan_view_form
mail_activity_plan_view_form_hr_employee mail.activity.plan.view.form.hr.employee mail.activity.plan form Inherits mail.mail_activity_plan_view_form_fixed_model
mail_activity_plan_view_tree mail.activity.plan.view.list.inherit.hr mail.activity.plan list Inherits mail.mail_activity_plan_view_tree
mail_activity_schedule_view_form mail.activity.schedule.view.form.inherit.hr mail.activity.schedule form Inherits mail.mail_activity_schedule_view_form
print_employee_badge print_employee_badge ir.ui.view qweb New
res_config_settings_view_form res.config.settings.view.form.inherit.hr res.config.settings form Inherits base.res_config_settings_view_form
res_partner_view_form res.partner.view.form.inherit.hr res.partner form Inherits base.view_partner_form
res_partner_view_search res.partner.search.inherit res.partner search Inherits base.view_res_partner_filter
res_users_view_form res.users.form.inherit res.users form Inherits base.view_users_form
res_users_view_form_preferences res.users.preferences.form.inherit res.users form Inherits res_users_view_form_simple_modif
res_users_view_form_simple_modif res.users.preferences.form.simplified.inherit res.users form Inherits base.view_users_form_simple_modif
res_users_view_list res.users.view.list.inherit.hr res.users list Inherits base.view_users_tree
resource_calendar_form_view_inherit_hr resource.calendar form Inherits resource.resource_calendar_form
resource_resource_form_view_inherit_hr resource.resource form Inherits resource.resource_resource_form
resource_resource_tree_view_inherit_hr resource.resource tree Inherits resource.resource_resource_tree
view_bank_account_allocation_line_list hr.bank.account.allocation.wizard.line.list hr.bank.account.allocation.wizard.line list New
view_bank_account_allocation_wizard hr.bank.account.allocation.wizard.form hr.bank.account.allocation.wizard form New
view_department_filter hr.department.search hr.department search New
view_department_form hr.department.form hr.department form New
view_department_tree hr.department.list hr.department list New
view_employee_category_form hr.employee.category.form hr.employee.category form New
view_employee_category_list hr.employee.category.list hr.employee.category list New
view_employee_filter hr.employee.search hr.employee search New
view_employee_form hr.employee.form hr.employee form New
view_employee_form_smartbutton_inherited view.employee.form.smartbutton.inherited hr.employee form Inherits view_employee_form
view_employee_tree hr.employee.list hr.employee list New
view_hr_job_form hr.job.form hr.job form New
view_hr_job_tree hr.job.list hr.job list New
view_job_filter hr.job.search hr.job search New
view_partner_bank_form_inherit_hr res.partner.bank.form.inherit.hr res.partner.bank form Inherits base.view_partner_bank_form
view_users_form_simple_modif_resource res.users.preferences.form.resource res.users form Inherits base.view_users_form_simple_modif
view_users_simple_form view.users.simple.form.hr res.users form Inherits base.view_users_simple_form
view_users_simple_form_inherit_hr view.users.simple.form.inherit.hr res.users form Inherits base.view_users_simple_form

HTTP endpoints 3

Route(s)HandlerAuthTypeMethodsFlags
/hr/get_org_chart HrOrgChartController.get_org_chart user jsonrpc ALL sudo
/hr/get_redirect_model HrOrgChartController.get_redirect_model user jsonrpc ALL
/hr/get_subordinates HrOrgChartController.get_subordinates user jsonrpc ALL

Models touched 33

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • subscription_department_ids Many2many → hr.department
    help='Automatically subscribe members of those departments to the channel.' string='HR Departments' args: 'hr.department'
Public methods (1)
  • write(self, vals)

New fields (2)
  • allocation_ids One2many → hr.bank.account.allocation.wizard.line
    readonly=False string='Allocations' args: 'hr.bank.account.allocation.wizard.line', 'wizard_id'
  • employee_id Many2one → hr.employee
    required=True args: 'hr.employee'
Public methods (2)
  • action_save(self)
  • create(self, vals_list)
    @api.model_create_multi

New fields (8)
  • account_number Char
    readonly=True related='bank_account_id.account_number'
  • amount Float
    digits=(16, 2) readonly=False string='Amount'
  • amount_type Selection
    readonly=False selection='_get_amount_type_selection_vals'
  • bank_account_id Many2one → res.partner.bank
    readonly=True required=True args: 'res.partner.bank'
  • sequence Integer
    default=10
  • symbol Char
    compute='_compute_symbol' readonly=True
  • trusted Boolean
    string='Trusted'
  • wizard_id Many2one → hr.bank.account.allocation.wizard
    ondelete='cascade' required=True args: 'hr.bank.account.allocation.wizard'
Public methods (1)
  • write(self, vals)

New fields (17)
  • active Boolean
    default=True args: 'Active'
  • child_ids One2many → hr.department
    string='Child Departments' args: 'hr.department', 'parent_id'
  • color Integer
    args: 'Color Index'
  • company_id Many2one → res.company
    compute='_compute_company_id' default=<expr> index=True readonly=False recursive=True store=True string='Company' tracking=True args: 'res.company'
  • complete_name Char
    compute='_compute_complete_name' recursive=True search='_search_complete_name' args: 'Complete Name'
  • has_read_access Boolean
    export_string_translation=False search='_search_has_read_access' store=False
  • jobs_ids One2many → hr.job
    string='Jobs' args: 'hr.job', 'department_id'
  • manager_id Many2one → hr.employee
    domain="['|', ('company_id', '=', False), ('company_id', 'in', allowed_company_ids)]" string='Manager' tracking=True args: 'hr.employee'
  • master_department_id Many2one → hr.department
    compute='_compute_master_department_id' store=True args: 'hr.department', 'Master Department'
  • member_ids One2many → hr.employee
    readonly=True string='Members' args: 'hr.employee', 'department_id'
  • name Char
    required=True translate=True args: 'Department Name'
  • note Text
    args: 'Note'
  • parent_id Many2one → hr.department
    check_company=True index=True string='Parent Department' args: 'hr.department'
  • parent_path Char
    index=True
  • plan_ids One2many → mail.activity.plan
    args: 'mail.activity.plan', 'department_id'
  • plans_count Integer
    compute='_compute_plan_count'
  • total_employee Integer
    compute='_compute_total_employee' export_string_translation=False string='Total Employee'
Public methods (9)
  • action_employee_from_department(self)
  • action_open_view_child_departments(self)
  • action_plan_from_department(self)
  • create(self, vals_list)
    @api.model_create_multi
  • get_children_department_ids(self)
    Return the departments and all their descendants (``child_of``), ``self`` included. :rtype: hr.department
  • get_department_hierarchy(self)
    Return the department with its parent and direct children, for the hierarchy widget. :return: ``{'parent': node or False, 'self': node, 'children': [node, ...]}`` where a node is ``{'id', 'name', 'employees'}`` (``employees`` being ``total_employee``); ``{}`` for an empty recordset :rtype: dict
  • get_record_default_action(self, access_uid=None)
  • name_create(self, name)
    @api.model
  • write(self, vals)
    Write on departments; a new ``manager_id`` becomes the manager of the department's employees. See :meth:`_update_employee_manager`.

New fields (5)
  • active Boolean
    default=True
  • country_code Char
    related='country_id.code'
  • country_id Many2one → res.country
    default=<expr> string='Country' args: 'res.country'
  • name Char
    required=True string='Reason' translate=True
  • sequence Integer
    default=10 args: 'Sequence'
Public methods (0)

No public methods.

New fields (148)
  • active Boolean
    default=True readonly=False related='resource_id.active' store=True args: 'Active'
  • activity_date_deadline Date
    groups='hr.group_hr_user'
  • activity_exception_decoration Selection
    groups='hr.group_hr_user'
  • activity_exception_icon Char
    groups='hr.group_hr_user'
  • activity_ids One2many
    groups='hr.group_hr_user'
  • activity_plans_ids Many2many
    groups='hr.group_hr_user'
  • activity_state Selection
    groups='hr.group_hr_user'
  • activity_summary Char
    groups='hr.group_hr_user'
  • activity_type_icon Char
    groups='hr.group_hr_user'
  • activity_type_id Many2one
    groups='hr.group_hr_user'
  • activity_user_id Many2one
    groups='hr.group_hr_user'
  • additional_note Text
    groups='hr.group_hr_user' string='Additional Note' tracking=True
  • age Integer
    compute='_compute_age' groups='hr.group_hr_user' args: 'Age'
  • bank_account_ids Many2many → res.partner.bank
    column1='employee_id' column2='bank_account_id' copy=False domain="[('partner_id', '=', work_contact_id), '|', ('company_id', '=', False), ('company_id', '=', company_id)]" groups='hr.group_hr_user' help='Employee bank accounts to pay salaries' relation='employee_bank_account_rel' string='Bank Accounts' tracking=True args: 'res.partner.bank'
  • barcode Char
    copy=False groups='hr.group_hr_user' help='ID used for employee identification.' string='Badge ID'
  • birthday Date
    groups='hr.group_hr_user' tracking=True args: 'Birthday'
  • birthday_month Selection
    compute='_compute_birthday_month' groups='hr.group_hr_user' selection=[('0', 'Not specified'), ('1', 'January'), ('2', 'February'), ('3', 'March'), ('4', 'April'), ('5', 'May'), ('6', 'June'), ('7', 'July'), ('8', 'August'), ('9', 'September'), ('10', 'October'), ('11', 'November'), ('12', 'December')] store=True string='Birthday Month'
  • birthday_public_display Boolean
    default=False groups='hr.group_hr_user' args: 'Show Birthday To Employees'
  • birthday_public_display_string Char
    compute='_compute_birthday_public_display_string' default='hidden' args: 'Public Date of Birth'
  • category_ids Many2many → hr.employee.category
    groups='hr.group_hr_user' string='Tags' args: 'hr.employee.category', 'employee_category_rel', 'employee_id', 'category_id'
  • certificate Selection
    groups='hr.group_hr_user' selection='_get_certificate_selection' string='Certificate Level' tracking=True
  • child_all_count Integer
    compute='_compute_subordinates' compute_sudo=True recursive=True store=False args: 'Indirect Subordinates Count'
  • child_count Integer
    compute='_compute_child_count' compute_sudo=True recursive=True args: 'Direct Subordinates Count'
  • child_ids One2many → hr.employee
    domain=[('active', '=', True)] string='Direct subordinates' args: 'hr.employee', 'parent_id'
  • coach_id Many2one → hr.employee
    compute='_compute_coach' domain="['|', ('company_id', '=', False), ('company_id', 'in', allowed_company_ids)]" help='Select the "Employee" who is the coach of this employee.\nThe "Coach" has no specific rights or responsibilities by default.' readonly=False store=True args: 'hr.employee', 'Coach'
  • color Integer
    default=0 args: 'Color Index'
  • company_country_code Char
    depends=['company_country_id'] groups='base.group_system,hr.group_hr_user' readonly=True related='company_country_id.code' string='Company Country Code'
  • company_country_id Many2one → res.country
    groups='base.group_system,hr.group_hr_user' readonly=True related='company_id.country_id' args: 'res.country', 'Company Country'
  • company_id Many2one → res.company
    required=True tracking=True args: 'res.company'
  • contract_date_end Date
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.contract_date_end'
  • contract_date_start Date
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.contract_date_start'
  • contract_template_id Many2one → hr.version
    groups='hr.group_hr_user' args: 'hr.version'
  • country_of_birth Many2one → res.country
    groups='hr.group_hr_user' string='Country of Birth' tracking=True args: 'res.country'
  • currency_id Many2one → res.currency
    groups='hr.group_hr_user' readonly=True related='company_id.currency_id' args: 'res.currency'
  • current_date_version Date
    groups='hr.group_hr_user' related='current_version_id.date_version' string='Current Date Employee Record'
  • current_version_id Many2one → hr.version
    bypass_search_access=True compute='_compute_current_version_id' index=True store=True string='Current Employee Record' args: 'hr.version'
  • date_end Date
    groups='hr.group_hr_user' inherited=True related='version_id.date_end'
  • date_start Date
    groups='hr.group_hr_user' inherited=True related='version_id.date_start'
  • department_color Integer
    related='department_id.color' args: 'Department Color'
  • departure_action_date Date
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.departure_action_date'
  • departure_apply_date Date
    groups='hr.group_hr_user' inherited=True related='version_id.departure_apply_date'
  • departure_apply_immediately Boolean
    groups='hr.group_hr_user' inherited=True related='version_id.departure_apply_immediately'
  • departure_date Date
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.departure_date'
  • departure_description Html
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.departure_description'
  • departure_id Many2one
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.departure_id'
  • departure_reason_id Many2one
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.departure_reason_id'
  • dismissal_date Date
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.dismissal_date'
  • driving_license Binary
    groups='hr.group_hr_user' string='Driving License'
  • driving_license_name Char
    groups='hr.group_hr_user'
  • email Char
    related='user_id.email'
  • emergency_contact Char
    groups='hr.group_hr_user' tracking=True
  • emergency_phone Char
    groups='hr.group_hr_user' tracking=True
  • emergency_phone_formatted Char
    compute='_compute_restricted_phone_companion_fields' export_string_translation=False groups='hr.group_hr_user' store=False
  • emergency_phone_sanitized Char
    compute='_compute_restricted_phone_companion_fields' export_string_translation=False groups='hr.group_hr_user' store=False
  • employee_properties Properties
    definition='company_id.employee_properties_definition' groups='hr.group_hr_user' precompute=False args: 'Properties'
  • employee_type_id Many2one
    groups='hr.group_hr_manager' inherited=True readonly=False related='version_id.employee_type_id'
  • exceptional_location_id Many2one → hr.work.location
    compute='_compute_exceptional_location_id' groups='hr.group_hr_user' help='This is the exceptional, non-weekly, location set for today.' string='Current' args: 'hr.work.location'
  • first_contract_date Date
    compute='_compute_first_contract_date' groups='hr.group_hr_user' help='The date of the first contract of the employee in the company.' store=True
  • fixed_term Boolean
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.fixed_term'
  • friday_location_id Many2one → hr.work.location
    index='btree_not_null' string='Friday' args: 'hr.work.location'
  • has_message Boolean
    groups='hr.group_hr_user'
  • has_multiple_bank_accounts Boolean
    compute='_compute_has_multiple_bank_accounts' default=False groups='hr.group_hr_user'
  • has_work_permit Binary
    groups='hr.group_hr_user' string='Work Permit'
  • hourly_cost Monetary
    groups='hr.group_hr_user' tracking=True args: 'Hourly Cost'
  • hr_icon_display Selection
    compute='_compute_presence_icon' args: [('presence_present', 'Present'), ('presence_out_of_working_hour', 'Off-Hours'), ('presence_absent', 'Absent'), ('presence_home', 'At Home'), ('presence_office', 'At Office'), ('presence_other', 'At Other'), ('presence_undetermined', 'Undetermined')]
  • hr_presence_state Selection
    compute='_compute_presence_state' compute_sql='_compute_sql_presence_state' compute_sudo=False default='out_of_working_hour' args: [('present', 'Present'), ('absent', 'Absent'), ('out_of_working_hour', 'Off-Hours')]
  • hr_responsible_id Many2one
    domain=<expr> groups='hr.group_hr_user' inherited=True readonly=False related='version_id.hr_responsible_id'
  • id_card Binary
    groups='hr.group_hr_user' string='ID Card Copy'
  • id_card_name Char
    groups='hr.group_hr_user'
  • is_current Boolean
    groups='hr.group_hr_user' inherited=True related='version_id.is_current'
  • is_future Boolean
    groups='hr.group_hr_user' inherited=True related='version_id.is_future'
  • is_in_contract Boolean
    groups='hr.group_hr_user' inherited=True related='version_id.is_in_contract'
  • is_past Boolean
    groups='hr.group_hr_user' inherited=True related='version_id.is_past'
  • is_subordinate Boolean
    compute='_compute_is_subordinate' search='_search_is_subordinate'
  • is_trusted_bank_account Boolean
    compute='_compute_is_trusted_bank_account' groups='hr.group_hr_user'
  • lang Selection
    groups='hr.group_hr_user' selection=_lang_get string='Lang'
  • last_activity Date
    compute='_compute_last_activity'
  • last_activity_time Char
    compute='_compute_last_activity'
  • legal_name Char
    compute='_compute_legal_name' groups='hr.group_hr_user' help="The employee's official name as per government-issued or legal documents." readonly=False store=True
  • message_attachment_count Integer
    groups='hr.group_hr_user'
  • message_follower_ids One2many
    groups='hr.group_hr_user'
  • message_has_error Boolean
    groups='hr.group_hr_user'
  • message_has_error_counter Integer
    groups='hr.group_hr_user'
  • message_ids One2many
    groups='hr.group_hr_user'
  • message_is_follower Boolean
    groups='hr.group_hr_user'
  • message_main_attachment_id Many2one
    groups='hr.group_hr_user'
  • message_needaction Boolean
    groups='hr.group_hr_user'
  • message_needaction_counter Integer
    groups='hr.group_hr_user'
  • message_partner_ids Many2many
    groups='hr.group_hr_user'
  • mobile_phone Char
    args: 'Work Mobile'
  • mobile_phone_formatted Char
    compute='_compute_phone_companion_fields' export_string_translation=False store=False
  • mobile_phone_sanitized Char
    compute='_compute_phone_companion_fields' export_string_translation=False store=False
  • monday_location_id Many2one → hr.work.location
    index='btree_not_null' string='Monday' args: 'hr.work.location'
  • my_activity_date_deadline Date
    groups='hr.group_hr_user'
  • name Char
    readonly=False related='resource_id.name' store=True string='Employee Name' tracking=True
  • nationality_country_code Char
    groups='hr.group_hr_user' related='version_id.country_id.code' string='Nationality'
  • newly_hired Boolean
    compute='_compute_newly_hired' search='_search_newly_hired' args: 'Newly Hired'
  • parent_company_id Many2one
    groups='hr.group_hr_user' readonly=True related='company_id.parent_id'
  • parent_id Many2one → hr.employee
    domain="['|', ('company_id', '=', False), ('company_id', 'in', allowed_company_ids)]" index=True tracking=True args: 'hr.employee', 'Manager'
  • permit_no Char
    groups='hr.group_hr_user' tracking=True args: 'Work Permit No'
  • phone Char
    related='user_id.phone'
  • phone_blacklisted Boolean
    groups='hr.group_hr_user'
  • phone_mobile_search Char
    groups='hr.group_hr_user'
  • phone_sanitized_blacklisted Boolean
    groups='hr.group_hr_user'
  • pin Char
    copy=False groups='hr.group_hr_user' help='PIN used to Check In/Out in the Kiosk Mode of the Attendance application (if enabled in Configuration) and to change the cashier in the Point of Sale application.' string='PIN'
  • place_of_birth Char
    groups='hr.group_hr_user' tracking=True args: 'Place of Birth'
  • primary_bank_account_id Many2one → res.partner.bank
    compute='_compute_primary_bank_account_id' groups='hr.group_hr_user' args: 'res.partner.bank'
  • private_email Char
    groups='hr.group_hr_user' string='Private Email'
  • private_phone Char
    groups='hr.group_hr_user' string='Private Phone'
  • private_phone_formatted Char
    compute='_compute_restricted_phone_companion_fields' export_string_translation=False groups='hr.group_hr_user' store=False
  • private_phone_sanitized Char
    compute='_compute_restricted_phone_companion_fields' export_string_translation=False groups='hr.group_hr_user' store=False
  • related_partners_count Integer
    compute='_compute_related_partners_count' groups='hr.group_hr_user'
  • resource_calendar_id Many2one
    domain="['|', ('company_id', '=', False), ('company_id.id', 'parent_of', company_id)]" index=False inherited=True related='version_id.resource_calendar_id' store=False
  • resource_id Many2one → resource.resource
    required=True args: 'resource.resource'
  • salary_distribution Json
    compute='_sync_salary_distribution' groups='hr.group_hr_user' readonly=False store=True string='Salary Distribution'
  • saturday_location_id Many2one → hr.work.location
    index='btree_not_null' string='Saturday' args: 'hr.work.location'
  • share Boolean
    related='user_id.share'
  • show_hr_icon_display Boolean
    compute='_compute_presence_icon'
  • split_legal_name Boolean
    compute='_compute_split_legal_name' groups='hr.group_hr_user' help="Indicates whether the legal name is split into first and last name fields based on the employee's country."
  • structure_type_id Many2one
    groups='hr.group_hr_manager' inherited=True readonly=False related='version_id.structure_type_id'
  • study_field Char
    groups='hr.group_hr_user' tracking=True args: 'Field of Study'
  • subordinate_ids One2many → hr.employee
    compute='_compute_subordinates' compute_sudo=True help='Direct and indirect subordinates' string='Subordinates' args: 'hr.employee'
  • sunday_location_id Many2one → hr.work.location
    index='btree_not_null' string='Sunday' args: 'hr.work.location'
  • thursday_location_id Many2one → hr.work.location
    index='btree_not_null' string='Thursday' args: 'hr.work.location'
  • today_location_name Char
  • trial_date_end Date
    groups='hr.group_hr_user' inherited=True readonly=False related='version_id.trial_date_end'
  • tuesday_location_id Many2one → hr.work.location
    index='btree_not_null' string='Tuesday' args: 'hr.work.location'
  • tz Selection
    inherited=True readonly=False related='version_id.tz' tracking=True
  • user_id Many2one → res.users
    check_company=True copy=False index='btree_not_null' ondelete='restrict' precompute=True readonly=False related='resource_id.user_id' store=True args: 'res.users', 'User'
  • user_partner_id Many2one
    related='user_id.partner_id' related_sudo=False string="User's partner"
  • user_state Selection
    groups='hr.group_hr_user' related='user_id.state' string='User Status'
  • version_id Many2one → hr.version
    compute='_compute_version_id' compute_sql='_compute_sql_version_id' compute_sudo=True ondelete='cascade' required=True search='_search_version_id' store=False string='Employee Record' args: 'hr.version'
  • version_ids One2many → hr.version
    groups='hr.group_hr_user' required=True string='Employee Records' args: 'hr.version', 'employee_id'
  • version_revision Char
    compute='_compute_version_revision' groups='hr.group_hr_user'
  • versions_count Integer
    compute='_compute_versions_count' groups='hr.group_hr_user' string='Employee Records Count'
  • visa_expire Date
    groups='hr.group_hr_user' tracking=True args: 'Visa Expiration Date'
  • visa_no Char
    groups='hr.group_hr_user' tracking=True args: 'Visa No'
  • wednesday_location_id Many2one → hr.work.location
    index='btree_not_null' string='Wednesday' args: 'hr.work.location'
  • work_contact_id Many2one → res.partner
    copy=False index='btree_not_null' args: 'res.partner', 'Work Contact'
  • work_email Char
    compute='_compute_work_contact_details' inverse='_inverse_work_contact_details' store=True args: 'Work Email'
  • work_location_name Char
    compute='_compute_work_location_name' args: 'Work Location Name'
  • work_location_type Selection
    compute='_compute_work_location_type' tracking=True args: [('home', 'Home'), ('office', 'Office'), ('other', 'Other')]
  • work_permit_expiration_date Date
    groups='hr.group_hr_user' tracking=True args: 'Work Permit Expiration Date'
  • work_permit_name Char
    compute='_compute_work_permit_name' groups='hr.group_hr_user' args: 'work_permit_name'
  • work_permit_scheduled_activity Boolean
    default=False groups='hr.group_hr_user'
  • work_phone Char
    compute='_compute_work_contact_details' inverse='_inverse_work_contact_details' readonly=False store=True tracking=True args: 'Work Phone'
  • work_phone_formatted Char
    compute='_compute_phone_companion_fields' export_string_translation=False store=False
  • work_phone_sanitized Char
    compute='_compute_phone_companion_fields' export_string_translation=False store=False
Public methods (36)
  • action_archive(self)
    Archive the employees and clear the references other employees have to them. The fields listed by :meth:`_get_employee_m2o_to_empty_on_archived_employees` and :meth:`_get_user_m2o_to_empty_on_archived_employees` are emptied on the employees pointing to the archived ones (or their users). Archiving an employee also archives its resource (``active`` is related).
  • action_cancel_departure(self)
    Cancel the employee's departure: unarchive, restore the contract end date and delete the departure. The contract end date saved on the departure (``last_contract_date_end``) is restored on the contract that was ended. Versions deleted when the departure was applied are not restored.
  • action_copy_invitation_link(self)
  • action_deactivate_user_and_depart(self)
  • action_new_departure(self)
    Open the "End of collaboration" wizard (``hr.employee.departure``) for the employee. If a departure is already planned (not applied), returns a client action asking to cancel it first. :raise UserError: if the employee is not in contract today, or has already departed
  • action_open_allocation_wizard(self)
  • action_open_versions(self)
  • action_related_contacts(self)
  • action_reset_password(self)
    Send a password-reset e-mail to the linked user.
  • action_send_invitation(self)
    Create a user and send a password-reset (invitation) e-mail to the linked user.
  • action_toggle_primary_bank_account_trust(self)
  • action_toggle_user_active(self)
    Activate / deactivate the linked user from the employee form.
  • check_no_existing_contract(self, date)
    Raise if the employee is already in contract on ``date``. Call it before :meth:`create_contract`. Single employee only. :param date: the date to check :type date: datetime.date or str :raise ValidationError: if a contract (of any active version) covers ``date``
  • create(self, vals_list)
    @api.model_create_multi
    Create employees, each with its resource, first version and work contact. Values of inherited ``hr.version`` fields (``date_version``, ``contract_date_start``, ``wage``, ``job_id``, ``resource_calendar_id``, ...) go to the first version, created through ``_inherits``; creation is done per company so that the version gets the right company. The values of a ``contract_template_id`` are applied to the first version (explicit values have priority). If ``user_id`` is given, the user's partner, image and timezone are used (:meth:`_sync_user`). A work contact is created for employees without one, an avatar is generated if there is no image, department channels are subscribed and an onboarding note is logged. Example:: env['hr.employee'].create({ 'name': 'John Doe', 'job_id': job.id, 'date_version': date(2026, 1, 1), 'contract_date_start': date(2026, 1, 1), 'wage': 3000, })
  • create_contract(self, date)
    Start a new contract on ``date`` and return the version carrying it. The contract starts on ``date`` and ends the day before the next future contract, or is open-ended (``contract_date_end = False``) if there is none. If a version already exists on ``date``, its contract dates are overwritten; otherwise a new version is created with :meth:`create_version` (copying the version in effect on ``date``). The caller must make sure the employee is not already in contract on ``date`` (see :meth:`check_no_existing_contract`). Single employee only. :param date: contract start date :type date: datetime.date or str :rtype: hr.version
  • create_version(self, values)
    Create a new version of the employee, effective from ``values['date_version']``. The new version is a copy of the version in effect on that date (see :meth:`_get_version`) on which ``values`` are written. If ``values`` does not specify them, the contract dates are those of the contract running on that date (``(False, False)`` if none). If a ``contract_date_end`` different from the running contract's end is given (with the same start), the end date is propagated to all versions of that contract. A ``contract_template_id`` in ``values`` is applied on the new version. Single employee only. Pitfall: if a version already exists with exactly this ``date_version``, it is returned **unchanged** (``values`` are not written). :param dict values: ``hr.version`` values; ``date_version`` (date, datetime or string) is mandatory :return: the new (or already existing) version :rtype: hr.version :raise ValueError: if ``date_version`` is missing :raise AccessError: if the user cannot write on the employee and the copied version
  • cycles_in_hierarchy_read(self, domain)
    @api.model
    Detect cycles in a parent-child hierarchy using Floyd's Tortoise and Hare algorithm. The algorithm works iff each child in the hierarchy has at most one parent. :param domain: A domain used to search for records in the hierarchy. :type domain: list :return: List of record IDs that are part of a cycle in a model. :rtype: list[int]
  • fetch(self, field_names=None)
    Fetch fields, reading them from ``hr.employee.public`` for users without read access. This is what makes ``employee.name`` work for a regular internal user: the public values are copied into the ``hr.employee`` cache; reading a non-public field raises an ``AccessError``. :raise AccessError: if ``field_names`` contains fields not available on ``hr.employee.public``
  • formatted_employee_attendance_intervals(self, start, stop)
    Return the expected attendances between two days, serialized for the web client. Whole days from ``start`` to ``stop`` are considered, in the employee's timezone. See :meth:`_get_expected_attendances`. Single employee only. :param start: first day (string or datetime, only the date part is used) :param stop: last day (string or datetime, only the date part is used) :return: ``[{'start': datetime, 'stop': datetime, 'attendance': [dict]}, ...]`` where ``attendance`` is the ``read()`` of the ``resource.calendar.attendance`` :rtype: list[dict]
  • generate_random_barcode(self)
  • get_accounts_with_fixed_allocations(self)
    Return the bank accounts receiving a fixed amount (not a percentage) of the salary. Based on ``salary_distribution`` (``{str(bank_account_id): {'sequence', 'amount', 'amount_is_percentage'}}``); accounts absent from it count as percentage-based. Single employee only. :rtype: res.partner.bank
  • get_bank_account_salary_allocation(self, account_id)
    Return the salary allocation of a bank account from ``salary_distribution``. :param int account_id: ``res.partner.bank`` id :return: ``(amount, amount_is_percentage)``; ``(0, None)`` if the account has no allocation :rtype: tuple
  • get_formview_id(self, access_uid=None)
    Return the public employee form view for users who are not HR officers. Used when opening a many2one to ``hr.employee``. :param int access_uid: the user to check instead of the current user :rtype: int
  • get_import_templates(self)
    @api.model
  • get_multi_version_changes(self, version_changes)
    Return a human-readable preview of changes to apply on several versions (web client). :param dict version_changes: ``{field_name: new_value}`` (ids for relational fields) :return: ``{'(Field label)': (old_value, new_value)}`` with values formatted as in tracking messages, old values read on ``self`` :rtype: dict
  • get_record_default_action(self, access_uid=None)
    Return the default action of the record, on ``hr.employee.public`` when needed. The action targets ``hr.employee.public`` if the user is not an HR officer or cannot read this employee. :param int access_uid: the user to check instead of the current user :rtype: dict
  • get_remaining_percentage(self)
    Return the salary percentage not yet allocated to a bank account (never below 0). :rtype: float
  • get_view(self, view_id=None, view_type='form', **options)
    @api.model
    Return the ``hr.employee.public`` view for users without read access to ``hr.employee``.
  • get_views(self, views, options=None)
    @api.model
    Return the views, replacing the "today's location" placeholders by today's weekday field. In the search and list archs, ``today_location_name`` and ``work_location_name`` are replaced by e.g. ``monday_location_id`` (see :meth:`_get_current_day_location_field`). :raise RedirectWarning: for users without read access to ``hr.employee``, redirecting them to the public employees action
  • is_onboarding(self, company_ids)
    @api.model
  • load_demo_data(self)
    @api.model
  • new(self, values=None, origin=None, ref=None)
    @api.model
    Create a new (in-memory) employee along with its in-memory version. Inherited ``hr.version`` values are put on a new version linked to the new employee, keeping only the fields the user can read.
  • notify_expiring_contract_work_permit(self)
    @api.model
    Schedule "to do" activities for expiring contracts and work permits (daily cron). For each company, targets employees whose current ``contract_date_end`` (resp. ``work_permit_expiration_date``) falls within the company's ``contract_expiration_notice_period`` (resp. ``work_permit_expiration_notice_period``) days from today. The activity is assigned to the HR responsible (or the current user), with the expiration date as deadline; existing identical activities are not duplicated. :return: ``True``
  • search_fetch(self, domain, field_names=None, offset=0, limit=None, order=None)
    @api.model
    Search and fetch, through ``hr.employee.public`` for users without read access. Users without access to ``hr.employee`` (e.g. regular internal users) still get an ``hr.employee`` recordset: the search runs on ``hr.employee.public`` (conditions on ``version_id``/``current_version_id`` are mapped or dropped) and the public values are copied into the cache of the ``hr.employee`` records. :raise AccessError: if ``field_names`` or ``domain`` contain fields not available on ``hr.employee.public``
  • unlink(self)
    Delete the employees, their versions and their ``resource.resource``. The versions are deleted by the database (``hr.version.employee_id`` has ``ondelete='cascade'``), so the ``hr.version`` unlink checks (an employee keeps at least one version) do not apply.
  • write(self, vals)
    Write on employees, sending inherited fields to their ``version_id`` in a single write. Values of inherited ``hr.version`` fields are written on ``version_id``, i.e. the current version, or the version given by the ``version_id`` context key (see :meth:`_compute_version_id`). To change data from a given date on, create a version instead (:meth:`create_version`). Writing on versions also sets ``last_modified_date/uid`` and logs an "As of <date>" tracking message. Side effects: ``user_id`` syncs work contact/image/timezone (:meth:`_sync_user`); ``tz`` is propagated to the linked user (same company); changing ``work_contact_id`` moves the bank accounts to the new partner (and untrusts them); ``resource_calendar_id`` updates the resource's calendar when the written version is the current one; ``current_version_id`` always copies the new version's calendar onto the resource; ``department_id``/``user_id`` subscribe the user to the department's auto-subscription channels.

New fields (3)
  • color Integer
    default=_get_default_color string='Color Index'
  • employee_ids Many2many → hr.employee
    string='Employees' args: 'hr.employee', 'employee_category_rel', 'category_id', 'employee_id'
  • name Char
    required=True string='Tag Name'
Public methods (0)

No public methods.

New fields (2)
  • date_version Date
    required=True string='Start Date'
  • employee_count Integer
    compute='_compute_employee_count' readonly=True
Public methods (1)
  • action_create_versions(self)

New fields (11)
  • action_date Date
    compute='_compute_action_date' help='Date at which the employee (and their user, if they have no other active employee) is archived, by default the day after the departure. If it is today or earlier, the departure is applied on confirmation; otherwise it is scheduled for that date.' store=True string='Archive Employee On'
  • apply_date Date
    readonly=True
  • apply_immediately Boolean
    compute='_compute_apply_immediately'
  • country_code Char
    related='employee_id.company_id.partner_id.country_id.code'
  • departure_date Date
    compute='_compute_departure_date' help='Date at which the departure actually takes place.' readonly=False store=True string='Departure Date'
  • departure_description Html
    string='Additional Information'
  • departure_reason_id Many2one → hr.departure.reason
    default=<expr> domain=<expr> index=True ondelete='restrict' required=True string='End Reason' args: 'hr.departure.reason'
  • dismissal_date Date
    default=fields.Date.today help='Date at which the departure process starts. Differs from the actual departure date in case of a notice period.' required=True string='Dismissal Date'
  • employee_id Many2one → hr.employee
    default=_get_default_employee_id domain=<expr> index=True ondelete='cascade' required=True string='Employee' args: 'hr.employee'
  • is_user_employee Boolean
    compute='_compute_is_user_employee' export_string_translation=False
  • last_contract_date_end Date
Public methods (3)
  • action_register(self)
    Apply the departures: archive the employees (and their users) and delete later versions. For the departures returned by :meth:`_get_departures_to_archive`: versions with ``date_version`` after the departure date are deleted, employees are archived (``hr.employee.action_archive``) and ``apply_date`` is set to today. A user is archived only if all its active employees are departing. :return: a notification action listing archived / kept users, or a window close action :rtype: dict :raise ValidationError: if a departure's apply date is in the future
  • action_schedule(self)
  • create(self, vals_list)
    @api.model_create_multi
    Create departures and end the employee's contract on the departure date. On all versions of the contract in effect on ``departure_date``, ``departure_id`` is set and ``contract_date_end`` becomes the departure date (only if the version has a contract). The previous contract end date is saved in ``last_contract_date_end`` (restored by ``hr.employee.action_cancel_departure``). The employee is archived later, by :meth:`action_register`.

New fields (7)
  • date Date
    string='Date'
  • day_week_string Char
    compute='_compute_day_week_string'
  • employee_id Many2one → hr.employee
    default=<expr> ondelete='cascade' required=True args: 'hr.employee'
  • employee_name Char
    related='employee_id.name'
  • work_location_id Many2one → hr.work.location
    index=True required=True string='Location' args: 'hr.work.location'
  • work_location_name Char
    related='work_location_id.name' string='Location name'
  • work_location_type Selection
    related='work_location_id.location_type'
Public methods (0)

No public methods.

New fields (70)
  • active Boolean
    readonly=True
  • address_id Many2one → res.partner
    readonly=True args: 'res.partner'
  • avatar_1024 Image
    compute_sudo=True related='employee_id.avatar_1024' args: 'Avatar 1024'
  • avatar_128 Image
    compute_sudo=True related='employee_id.avatar_128' args: 'Avatar 128'
  • avatar_1920 Image
    compute_sudo=True related='employee_id.avatar_1920' args: 'Avatar'
  • avatar_256 Image
    compute_sudo=True related='employee_id.avatar_256' args: 'Avatar 256'
  • avatar_512 Image
    compute_sudo=True related='employee_id.avatar_512' args: 'Avatar 512'
  • birthday_public_display_string Char
    related='employee_id.birthday_public_display_string' args: 'Public Date of Birth'
  • child_all_count Integer
    compute='_compute_child_all_count'
  • child_count Integer
    compute='_compute_child_count'
  • child_ids One2many → hr.employee.public
    readonly=True string='Direct subordinates' args: 'hr.employee.public', 'parent_id'
  • coach_id Many2one → hr.employee.public
    readonly=True args: 'hr.employee.public', 'Coach'
  • color Integer
    readonly=True
  • company_id Many2one → res.company
    readonly=True args: 'res.company'
  • country_code Char
    compute='_compute_country_code'
  • create_date Datetime
    readonly=True
  • department_color Integer
    compute='_compute_department_color'
  • department_id Many2one → hr.department
    readonly=True args: 'hr.department'
  • email Char
    related='employee_id.email'
  • employee_id Many2one → hr.employee
    readonly=True args: 'hr.employee', 'Employee'
  • friday_location_id Many2one → hr.work.location
    string='Friday' args: 'hr.work.location'
  • hours_per_day Float
    compute='_compute_hours_per_day'
  • hours_per_week Float
    compute='_compute_hours_per_week'
  • hr_icon_display Selection
    compute='_compute_presence_icon' selection='_get_selection_hr_icon_display'
  • hr_presence_state Selection
    compute='_compute_presence_state' default='out_of_working_hour' args: [('present', 'Present'), ('absent', 'Absent'), ('out_of_working_hour', 'Off-Hours')]
  • image_1024 Image
    compute_sudo=True related='employee_id.image_1024' args: 'Image 1024'
  • image_128 Image
    compute_sudo=True related='employee_id.image_128' args: 'Image 128'
  • image_1920 Image
    compute_sudo=True related='employee_id.image_1920' args: 'Image'
  • image_256 Image
    compute_sudo=True related='employee_id.image_256' args: 'Image 256'
  • image_512 Image
    compute_sudo=True related='employee_id.image_512' args: 'Image 512'
  • is_manager Boolean
    compute='_compute_is_manager'
  • is_subordinate Boolean
    related='employee_id.is_subordinate'
  • is_user Boolean
    compute='_compute_is_user'
  • job_id Many2one → hr.job
    readonly=True args: 'hr.job'
  • job_title Char
    readonly=True
  • last_activity Date
    compute='_compute_last_activity'
  • last_activity_time Char
    compute='_compute_last_activity'
  • member_of_department Boolean
    compute='_compute_member_of_department' search='_search_part_of_department'
  • mobile_phone Char
    readonly=True
  • mobile_phone_formatted Char
    related='employee_id.mobile_phone_formatted'
  • mobile_phone_sanitized Char
    related='employee_id.mobile_phone_sanitized'
  • monday_location_id Many2one → hr.work.location
    string='Monday' args: 'hr.work.location'
  • name Char
    readonly=True
  • newly_hired Boolean
    compute='_compute_newly_hired' search='_search_newly_hired' args: 'Newly Hired'
  • parent_id Many2one → hr.employee.public
    readonly=True args: 'hr.employee.public', 'Manager'
  • phone Char
    related='employee_id.phone'
  • phone_formatted Char
    related='employee_id.phone_formatted'
  • phone_sanitized Char
    readonly=True
  • resource_calendar_id Many2one → resource.calendar
    readonly=True args: 'resource.calendar'
  • resource_id Many2one → resource.resource
    readonly=True args: 'resource.resource'
  • saturday_location_id Many2one → hr.work.location
    string='Saturday' args: 'hr.work.location'
  • share Boolean
    related='employee_id.share'
  • show_hr_icon_display Boolean
    compute='_compute_presence_icon'
  • subordinate_ids One2many
    compute_sudo=True related='employee_id.subordinate_ids'
  • sunday_location_id Many2one → hr.work.location
    string='Sunday' args: 'hr.work.location'
  • thursday_location_id Many2one → hr.work.location
    string='Thursday' args: 'hr.work.location'
  • today_location_name Char
  • tuesday_location_id Many2one → hr.work.location
    string='Tuesday' args: 'hr.work.location'
  • tz Selection
    related='resource_id.tz'
  • user_id Many2one → res.users
    readonly=True args: 'res.users'
  • user_partner_id Many2one
    related='user_id.partner_id' related_sudo=False string="User's partner"
  • wednesday_location_id Many2one → hr.work.location
    string='Wednesday' args: 'hr.work.location'
  • work_contact_id Many2one → res.partner
    readonly=True args: 'res.partner'
  • work_email Char
    readonly=True
  • work_location_id Many2one → hr.work.location
    readonly=True args: 'hr.work.location'
  • work_location_name Char
    related='employee_id.work_location_name'
  • work_location_type Selection
    related='employee_id.work_location_type'
  • work_phone Char
    readonly=True
  • work_phone_formatted Char
    related='employee_id.work_phone_formatted'
  • work_phone_sanitized Char
    related='employee_id.work_phone_sanitized'
Public methods (1)
  • init(self)
    (Re)create the SQL view: ``hr_employee`` joined with its current ``hr_version``. ``hr.employee.public`` is a read-only view exposing the non-sensitive employee data to all internal users (``hr.employee`` itself is restricted to HR officers). Its ids are the employee ids. Archived employees are included (filtered by the ``active`` column).

New fields (8)
  • code Char
    compute='_compute_code' readonly=False store=True
  • company_id Many2one → res.company
    string='Company' args: 'res.company'
  • country_code Char
    related='country_id.code'
  • country_id Many2one → res.country
    domain=<expr> args: 'res.country'
  • employee_ids One2many → hr.employee
    string='Related Employees' args: 'hr.employee', 'employee_type_id'
  • employees_count Integer
    compute='_compute_employee_count' string='Employees'
  • name Char
    required=True translate=True
  • sequence Integer
    default=10
Public methods (1)
  • action_open_employees(self)

New fields (14)
  • active Boolean
    default=True
  • company_country_code Char
    depends=['company_id.country_id'] related='company_id.country_id.code'
  • company_id Many2one → res.company
    default=<expr> domain=<expr> index=True required=True string='Company' tracking=True args: 'res.company'
  • department_id Many2one → hr.department
    check_company=True index='btree_not_null' string='Department' tracking=True args: 'hr.department'
  • description Html
    sanitize_attributes=False string='Job Description'
  • employee_ids One2many → hr.employee
    groups='base.group_user' string='Employees' args: 'hr.employee', 'job_id'
  • employee_type_id Many2one → hr.employee.type
    string='Employee Type' tracking=True args: 'hr.employee.type'
  • expected_employees Integer
    compute='_compute_employees' groups='hr.group_hr_user' help='Expected number of employees for this job position after new recruitment.' string='Total Forecasted Employees'
  • name Char
    index='trigram' required=True string='Job Position' translate=True
  • no_of_employee Integer
    compute='_compute_employees' groups='hr.group_hr_user' help='Number of employees currently occupying this job position.' string='Current Number of Employees'
  • no_of_recruitment Integer
    copy=False default=1 help='Number of new employees you expect to recruit.' string='Target'
  • recruiter_id Many2one → hr.employee
    check_company=True default=<expr> domain=_recruiter_domain help='The Recruiter will be the default value for all Applicants in this job position. The Recruiter is automatically added to all meetings with the Applicant.' index=True tracking=True args: 'hr.employee', 'Recruiter'
  • requirements Text
    groups='hr.group_hr_user' args: 'Requirements'
  • sequence Integer
    default=10
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
    We don't want the current user to be follower of all created job
  • write(self, vals)

New fields (2)
  • employee_id Many2one → hr.employee
    readonly=True string='Employee' args: 'hr.employee'
  • has_department_manager_access Boolean
    compute='_compute_has_department_manager_access' search='_search_has_department_manager_access'
Public methods (0)

No public methods.

New fields (4)
  • country_code Char
    related='country_id.code'
  • country_id Many2one → res.country
    default=<expr> domain=<expr> string='Country' args: 'res.country'
  • default_resource_calendar_id Many2one → resource.calendar
    default=<expr> domain=<expr> string='Working Hours' args: 'resource.calendar'
  • name Char
    args: 'Salary Structure Type'
Public methods (0)

No public methods.

New fields (63)
  • active Boolean
    default=True tracking=1
  • active_employee Boolean
    groups='hr.group_hr_user' related='employee_id.active' string='Active Employee'
  • address_id Many2one → res.partner
    check_company=True compute='_compute_address_id' index='btree_not_null' readonly=False store=True string='Work Address' tracking=1 args: 'res.partner'
  • allowed_country_state_ids Many2many → res.country.state
    compute='_compute_allowed_country_state_ids' groups='hr.group_hr_user' args: 'res.country.state'
  • children Integer
    groups='hr.group_hr_user' string='Dependent Children' tracking=1
  • company_country_id Many2one → res.country
    readonly=True related='company_id.country_id' string='Company country' args: 'res.country'
  • company_id Many2one → res.company
    compute='_compute_company_id' default=<expr> index=True readonly=False store=True tracking=1 args: 'res.company'
  • contract_date_end Date
    groups='hr.group_hr_user' help="End date of the contract (if it's a fixed-term contract)." tracking=1 args: 'Contract End Date'
  • contract_date_start Date
    groups='hr.group_hr_user' tracking=1 args: 'Contract Start Date'
  • contract_template_id Many2one → hr.version
    domain="[('company_id', '=', company_id), ('employee_id', '=', False)]" groups='hr.group_hr_user' help='Select a contract template to auto-fill the contract form with predefined values. You can still edit the fields as needed after applying the template.' string='Contract Template' tracking=1 args: 'hr.version'
  • country_code Char
    depends=['company_country_id'] readonly=True related='company_country_id.code'
  • country_id Many2one → res.country
    groups='hr.group_hr_user' index='btree_not_null' tracking=1 args: 'res.country', 'Nationality (Country)'
  • currency_id Many2one
    readonly=True related='company_id.currency_id' string='Currency'
  • date_end Date
    compute='_compute_dates' groups='hr.group_hr_user' search='_search_end_date'
  • date_start Date
    compute='_compute_dates' groups='hr.group_hr_user' search='_search_start_date'
  • date_version Date
    default=fields.Date.context_today groups='hr.group_hr_user' required=True string='Effective Date' tracking=1
  • department_id Many2one → hr.department
    check_company=True index=True tracking=1 args: 'hr.department'
  • departure_action_date Date
    groups='hr.group_hr_user' readonly=False related='departure_id.action_date'
  • departure_apply_date Date
    groups='hr.group_hr_user' related='departure_id.apply_date'
  • departure_apply_immediately Boolean
    groups='hr.group_hr_user' related='departure_id.apply_immediately'
  • departure_date Date
    groups='hr.group_hr_user' readonly=False related='departure_id.departure_date' tracking=1
  • departure_description Html
    groups='hr.group_hr_user' readonly=False related='departure_id.departure_description'
  • departure_id Many2one → hr.employee.departure
    copy=False index='btree_not_null' string='Departure' args: 'hr.employee.departure'
  • departure_reason_id Many2one
    groups='hr.group_hr_user' readonly=False related='departure_id.departure_reason_id' tracking=1
  • dismissal_date Date
    groups='hr.group_hr_user' readonly=False related='departure_id.dismissal_date' tracking=1
  • display_name Char
    compute='_compute_display_name'
  • distance_home_work Integer
    groups='hr.group_hr_user' string='Home-Work Distance' tracking=1
  • distance_home_work_unit Selection
    default='kilometers' groups='hr.group_hr_user' required=True tracking=1 args: [('kilometers', 'km'), ('miles', 'mi')], 'Home-Work Distance unit'
  • employee_id Many2one → hr.employee
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" index=True ondelete='cascade' string='Employee' tracking=1 args: 'hr.employee'
  • employee_type_id Many2one → hr.employee.type
    groups='hr.group_hr_manager' index=True tracking=1 args: 'hr.employee.type', 'Employee Type'
  • fixed_term Boolean
    groups='hr.group_hr_user' tracking=1 args: 'Fixed Term'
  • hr_responsible_id Many2one → res.users
    default=<expr> domain=<expr> groups='hr.group_hr_user' help="Person responsible for validating the employee's contracts." required=True tracking=1 args: 'res.users', 'HR Responsible'
  • identification_id Char
    groups='hr.group_hr_user' help="Enter the employee's National Identification Number issued by the government (e.g., Aadhaar, SIN, NIN). This is used for official records and statutory compliance." string='Identification No' tracking=1
  • is_current Boolean
    compute='_compute_is_current' groups='hr.group_hr_user'
  • is_custom_job_title Boolean
    compute='_compute_is_custom_job_title' default=False groups='hr.group_hr_user' store=True
  • is_future Boolean
    compute='_compute_is_future' groups='hr.group_hr_user'
  • is_in_contract Boolean
    compute='_compute_is_in_contract' groups='hr.group_hr_user'
  • is_past Boolean
    compute='_compute_is_past' groups='hr.group_hr_user'
  • job_id Many2one → hr.job
    check_company=True index=True tracking=1 args: 'hr.job'
  • job_title Char
    compute='_compute_job_title' inverse='_inverse_job_title' readonly=False store=True string='Job Title' tracking=True
  • km_home_work Integer
    compute='_compute_km_home_work' groups='hr.group_hr_user' inverse='_inverse_km_home_work' store=True string='Home-Work Distance in Km' tracking=1
  • last_modified_date Datetime
    default=fields.Datetime.now groups='hr.group_hr_user' required=True string='Last Modified on'
  • last_modified_uid Many2one → res.users
    default=<expr> groups='hr.group_hr_user' required=True string='Last Modified by' args: 'res.users'
  • marital Selection
    default='single' groups='hr.group_hr_user' required=True selection='_get_marital_status_selection' string='Marital Status' tracking=1
  • member_of_department Boolean
    compute='_compute_part_of_department' help="Whether the employee is a member of the active user's department or one of it's child department." search='_search_part_of_department' args: 'Member of department'
  • name Char
    tracking=1
  • passport_expiration_date Date
    groups='hr.group_hr_user' tracking=1 args: 'Passport Expiration Date'
  • passport_id Char
    groups='hr.group_hr_user' tracking=1 args: 'Passport No'
  • private_city Char
    groups='hr.group_hr_user' string='Private City' tracking=1
  • private_country_id Many2one → res.country
    default=<expr> groups='hr.group_hr_user' index='btree_not_null' string='Private Country' tracking=1 args: 'res.country'
  • private_state_id Many2one → res.country.state
    domain="[('id', 'in', allowed_country_state_ids)]" groups='hr.group_hr_user' string='Private State' tracking=1 args: 'res.country.state'
  • private_street Char
    groups='hr.group_hr_user' string='Private Street' tracking=1
  • private_street2 Char
    groups='hr.group_hr_user' string='Private Street2' tracking=1
  • private_zip Char
    groups='hr.group_hr_user' string='Private Zip' tracking=1
  • resource_calendar_id Many2one → resource.calendar
    default=<expr> domain="['|', ('company_id', '=', False), ('company_id.id', 'parent_of', company_id)]" index='btree_not_null' inverse='_inverse_resource_calendar_id' required=True string='Working Hours' tracking=1 args: 'resource.calendar'
  • sex Selection
    groups='hr.group_hr_user' help='This is the legal sex as recognized by the state, used for official and statutory purposes.' tracking=1 args: [('male', 'Male'), ('female', 'Female')]
  • spouse_birthdate Date
    groups='hr.group_hr_user' string='Spouse Birthdate' tracking=1
  • spouse_complete_name Char
    groups='hr.group_hr_user' string='Spouse Legal Name' tracking=1
  • structure_type_id Many2one → hr.payroll.structure.type
    compute='_compute_structure_type_id' default=_default_salary_structure groups='hr.group_hr_manager' index='btree_not_null' readonly=False store=True string='Salary Structure Type' tracking=1 args: 'hr.payroll.structure.type'
  • trial_date_end Date
    groups='hr.group_hr_user' help='End date of the trial period (if there is one).' tracking=1 args: 'End of Trial Period'
  • tz Selection
    default=<expr> required=True string='Timezone' args: _tz_get
  • wage Monetary
    aggregator='avg' groups='hr.group_hr_manager' help="Employee's monthly gross wage." tracking=1 args: 'Wage'
  • work_location_id Many2one → hr.work.location
    compute='_compute_work_location_id' index=True readonly=False store=True tracking=1 args: 'hr.work.location', 'Work Location'
Public methods (7)
  • action_open_version(self)
  • action_open_version_form_view(self)
  • check_contract_finished(self)
    Raise if the version has an open-ended contract (start date but no end date). :raise ValidationError: if ``contract_date_start`` is set and ``contract_date_end`` is not
  • create(self, vals_list)
    @api.model_create_multi
    Create versions, pre-filling them from ``contract_template_id`` when given. Template values (see :meth:`get_values_from_contract_template`) only fill the keys absent from ``vals``. To add a version to an existing employee, prefer ``hr.employee.create_version``, which copies the version in effect and keeps the contract dates consistent.
  • get_record_default_action(self, access_uid=None)
    Return the action opening the version: the employee form for employee versions. - Version of an employee: opens the employee (``hr.employee``, or ``hr.employee.public`` for non HR officers) with ``version_id`` in the context, so that the form shows this version. - Contract template (no employee): opens the version with the contract template form view. :param int access_uid: the user to check instead of the current user :rtype: dict
  • get_values_from_contract_template(self, contract_template_id)
    Return the values to copy from a contract template onto a version. Contract templates are ``hr.version`` records without employee. Only the whitelisted fields (:meth:`_get_whitelist_fields_from_template`, evaluated in the template's company) are returned. :param contract_template_id: the template (may be empty) :type contract_template_id: hr.version :return: values in ``copy_data`` format, ``{}`` without template :rtype: dict
  • write(self, vals)
    Write on versions, keeping the contract dates consistent across the versions of a contract. All versions of a contract share the same ``contract_date_start`` and ``contract_date_end``: writing one of these fields on a version writes them on every active version of the same contract (writing a start date on the only version of an employee also moves its ``date_version``; on versions not yet in contract, only the written versions are affected). Writing them on versions of different contracts of the same employee at once is refused. Pass ``sync_contract_dates=True`` in the context to bypass the propagation and write the values as is. Changes of tracked fields are logged on the employees' chatter, one message per interval of consecutive written versions (see `_track_on_employees`). Pass ``skip_employee_tracking=True`` in the context to skip it. Also notifies the employee when ``hr_responsible_id`` changes. :raise ValidationError: when unassigning or archiving all the versions of an employee, or writing contract dates on versions of different contracts at once

New fields (9)
  • active Boolean
    default=True
  • address_id Many2one → res.partner
    check_company=True default=<expr> index='btree_not_null' string='Work Address' args: 'res.partner'
  • company_id Many2one → res.company
    default=<expr> index=True required=True args: 'res.company'
  • country_code Char
    depends=['company_id'] related='company_id.country_id.code'
  • currency_id Many2one → res.currency
    related='company_id.currency_id' args: 'res.currency'
  • icon Char
    compute='_compute_icon'
  • location_number Char
  • location_type Selection
    default='office' required=True string='Location Type' args: [('home', 'Home'), ('office', 'Office'), ('other', 'Other')]
  • name Char
    required=True string='Work Location'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • technical_usage Selection
    selection_add=[('hr_expiring_contract', 'Expiring Contract'), ('hr_expiring_work_permit', 'Expiring Work Permit')]
Public methods (0)

No public methods.

New fields (2)
  • department_assignable Boolean
    compute='_compute_department_assignable'
  • department_id Many2one → hr.department
    check_company=True compute='_compute_department_id' index='btree_not_null' ondelete='cascade' readonly=False store=True args: 'hr.department'
Public methods (0)

No public methods.

New fields (1)
  • responsible_type Selection
    ondelete={'manager': 'cascade', 'employee': 'cascade'} selection_add=[('manager', 'Manager'), ('employee', 'Employee')]
Public methods (0)

No public methods.

New fields (2)
  • department_id Many2one → hr.department
    compute='_compute_department_id' args: 'hr.department'
  • plan_department_filterable Boolean
    compute='_compute_plan_department_filterable'
Public methods (0)

No public methods.

New fields (1)
  • alias_contact Selection
    ondelete={'employees': 'cascade'} selection_add=[('employees', 'Authenticated Employees')]
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (9)
  • contract_expiration_notice_period Integer
    default=7 args: 'Contract Expiry Notice Period'
  • employee_properties_definition PropertiesDefinition
    args: 'Employee Properties'
  • hr_presence_control_attendance Boolean
    default=<expr> string='Based on attendances'
  • hr_presence_control_email Boolean
    string='Based on number of emails sent'
  • hr_presence_control_email_amount Integer
    string='# emails to send'
  • hr_presence_control_ip Boolean
    string='Based on IP Address'
  • hr_presence_control_ip_list Char
    string='Valid IP addresses'
  • hr_presence_control_login Boolean
    default=True string='Based on user status in system'
  • work_permit_expiration_notice_period Integer
    default=60 args: 'Work Permit Expiry Notice Period'
Public methods (0)

No public methods.

New fields (12)
  • company_tz Selection
    readonly=False related='company_id.tz' string='Company Timezone'
  • contract_expiration_notice_period Integer
    readonly=False related='company_id.contract_expiration_notice_period' string='Contract Expiry Notice Period'
  • hr_presence_control_attendance Boolean
    readonly=False related='company_id.hr_presence_control_attendance'
  • hr_presence_control_email Boolean
    readonly=False related='company_id.hr_presence_control_email'
  • hr_presence_control_email_amount Integer
    readonly=False related='company_id.hr_presence_control_email_amount'
  • hr_presence_control_ip Boolean
    readonly=False related='company_id.hr_presence_control_ip'
  • hr_presence_control_ip_list Char
    readonly=False related='company_id.hr_presence_control_ip_list'
  • hr_presence_control_login Boolean
    readonly=False related='company_id.hr_presence_control_login'
  • module_hr_presence Boolean
    string='Advanced Presence Control'
  • module_hr_skills Boolean
    string='Skills Management'
  • resource_calendar_id Many2one → resource.calendar
    readonly=False related='company_id.resource_calendar_id' args: 'resource.calendar', 'Company Working Hours'
  • work_permit_expiration_notice_period Integer
    readonly=False related='company_id.work_permit_expiration_notice_period' string='Work Permit Expiry Notice Period'
Public methods (1)
  • set_values(self)

New fields (3)
  • employee Boolean
    compute='_compute_employee' copy=False help='Whether this contact is an Employee.' readonly=False store=True
  • employee_ids One2many → hr.employee
    groups='hr.group_hr_user' help='Related employees based on their private address' string='Employees' args: 'hr.employee', 'work_contact_id'
  • employees_count Integer
    compute='_compute_employees_count' groups='hr.group_hr_user'
Public methods (1)
  • action_open_employees(self)

New fields (5)
  • currency_symbol Char
    related='employee_id.currency_id.symbol'
  • employee_has_multiple_bank_accounts Boolean
    related='employee_id.has_multiple_bank_accounts'
  • employee_id Many2many → hr.employee
    compute='_compute_employee_id' search='_search_employee_id' args: 'hr.employee', 'Employee'
  • employee_salary_amount Float
    compute='_compute_salary_amount' digits=(16, 4) readonly=True store=False string='Salary Allocation'
  • employee_salary_amount_is_percentage Boolean
    compute='_compute_salary_amount' readonly=True store=False
Public methods (1)
  • action_open_allocation_wizard(self)

New fields (46)
  • additional_note Text
    user_writeable=True
  • all_employee_ids One2many → hr.employee
    string='Related employees from all companies' args: 'hr.employee', 'user_id'
  • bank_account_ids Many2many → res.partner.bank
    args: 'res.partner.bank'
  • barcode Char
    user_writeable=True
  • birthday Date
    user_writeable=True
  • birthday_public_display Boolean
    user_writeable=True
  • category_ids Many2many → hr.employee.category
    user_writeable=True args: 'hr.employee.category'
  • create_employee Boolean
    copy=False default=False store=False string='Technical field, whether to create an employee'
  • create_employee_id Many2one → hr.employee
    copy=False store=False string='Technical field, bind user to this employee on create' args: 'hr.employee'
  • department_id Many2one
    related='employee_id.department_id' string='Department'
  • emergency_contact Char
    user_writeable=True
  • emergency_phone Char
    user_writeable=True
  • employee_bank_account_ids Many2many → res.partner.bank
    user_writeable=True args: 'res.partner.bank'
  • employee_count Integer
    compute='_compute_employee_count'
  • employee_id Many2one → hr.employee
    compute='_compute_company_employee' readonly=True search='_search_company_employee' string='Company employee' args: 'hr.employee'
  • employee_ids One2many → hr.employee
    domain=_employee_ids_domain string='Related employee' args: 'hr.employee', 'user_id'
  • employee_public_ids One2many → hr.employee.public
    domain=_employee_ids_domain readonly=True string='Related employee (public)' args: 'hr.employee.public', 'user_id'
  • employee_resource_calendar_id Many2one
    readonly=True related='employee_id.resource_calendar_id' string="Employee's Working Hours"
  • friday_location_id Many2one → hr.work.location
    user_writeable=True args: 'hr.work.location'
  • is_hr_user Boolean
    compute='_compute_is_hr_user'
  • is_system Boolean
    compute='_compute_is_system'
  • job_title Char
    user_writeable=True
  • km_home_work Integer
    user_writeable=True
  • mobile_phone Char
    user_writeable=True
  • monday_location_id Many2one → hr.work.location
    user_writeable=True args: 'hr.work.location'
  • pin Char
    user_writeable=True
  • private_city Char
    user_writeable=True
  • private_country_id Many2one → res.country
    user_writeable=True args: 'res.country'
  • private_email Char
    user_writeable=True
  • private_phone Char
    user_writeable=True
  • private_state_id Many2one → res.country.state
    domain="[('country_id', '=?', private_country_id)]" user_writeable=True args: 'res.country.state'
  • private_street Char
    user_writeable=True
  • private_street2 Char
    user_writeable=True
  • private_zip Char
    user_writeable=True
  • saturday_location_id Many2one → hr.work.location
    user_writeable=True args: 'hr.work.location'
  • sunday_location_id Many2one → hr.work.location
    user_writeable=True args: 'hr.work.location'
  • thursday_location_id Many2one → hr.work.location
    user_writeable=True args: 'hr.work.location'
  • tuesday_location_id Many2one → hr.work.location
    user_writeable=True args: 'hr.work.location'
  • visa_expire Date
    user_writeable=True
  • wednesday_location_id Many2one → hr.work.location
    user_writeable=True args: 'hr.work.location'
  • work_contact_id Many2one → res.partner
    args: 'res.partner'
  • work_email Char
    user_writeable=True
  • work_location_id Many2one → hr.work.location
    user_writeable=True args: 'hr.work.location'
  • work_location_name Char
    related='employee_id.work_location_name'
  • work_location_type Selection
    related='employee_id.work_location_type'
  • work_phone Char
    user_writeable=True
Public methods (7)
  • action_create_employee(self)
    Create an employee for the user in the current company and return it. :rtype: hr.employee :raise AccessError: if the user is not allowed in the current company
  • action_get(self)
    @api.model
  • action_open_employees(self)
  • action_related_contact(self)
  • create(self, vals_list)
    @api.model_create_multi
    Create users, optionally creating or binding their employee. With ``create_employee=True`` in the values, an employee is created in the current company (:meth:`hr.employee._sync_user`); with ``create_employee_id``, that existing employee is linked to the user.
  • get_record_default_action(self, access_uid=None)
    Override this method in order to redirect many2one towards the full user form view incase the user is ERP manager and the request coming from employee form.
  • write(self, vals)
    Write on users and synchronize their employees in the current company. Writing employee-related fields (see :func:`related_employee_field`) notifies the partners given by :meth:`_get_personal_info_partner_ids_to_notify`. The fields of :meth:`_get_employee_fields_to_sync` are then written (in sudo) on the users' employees of the current company.

New fields (3)
  • employees_count Integer
    compute='_compute_employees_count' string='Employees Count'
  • material_resources_count Integer
    compute='_compute_material_resources_count' string='Material Resources Count'
  • version_ids One2many → hr.version
    copy=False readonly=True args: 'hr.version', 'resource_calendar_id'
Public methods (4)
  • action_duplicate_and_apply_to_employee(self)
    Duplicates the current calendar and automatically assigns the new duplicate to the employee passed via context from the employee form view navigation.
  • action_view_employees(self)
  • transfer_leaves_to(self, other_calendar, resources=None, from_date=None)
    Move the leaves of these calendars starting from ``from_date`` to ``other_calendar``. :param other_calendar: the target calendar :type other_calendar: resource.calendar :param resources: only move the leaves of these resources (all leaves if empty/``None``) :type resources: resource.resource or None :param from_date: only move leaves with ``date_from >= from_date``; today 00:00 (naive UTC) by default :type from_date: datetime.datetime or None
  • write(self, vals)
    Refuse to modify a calendar used by versions of companies the user has not selected. :raise ValidationError: if a version using the calendar belongs to a company outside ``env.companies``

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (11)
  • calendar_id Many2one
    compute='_compute_calendar_id' inverse='_inverse_calendar_id' readonly=False store=True
  • department_id Many2one → hr.department
    compute='_compute_department_id' compute_sudo=True args: 'hr.department'
  • employee_id One2many → hr.employee
    check_company=True context={'active_test': False} args: 'hr.employee', 'resource_id'
  • hr_icon_display Selection
    related='employee_id.hr_icon_display'
  • job_title Char
    compute='_compute_job_title' compute_sudo=True
  • show_hr_icon_display Boolean
    related='employee_id.show_hr_icon_display'
  • tz Selection
    compute='_compute_tz' inverse='_inverse_tz' readonly=False store=True
  • user_id Many2one
    copy=False
  • work_email Char
    related='employee_id.work_email'
  • work_location_id Many2one
    related='employee_id.work_location_id'
  • work_phone Char
    related='employee_id.work_phone'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…