Employees
hr · odoo/odoo
Replaces
hr_contract_type via hr_contract (15.0) · hr_contract (19.0) · hr_homeworking, hr_hourly_cost, hr_org_chart (20.0) Health
100/100
good
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by25/2519 modules depend on it
-
Maturity25/25In 15 Odoo series since 6.1
Heuristic over the facts below, not an audit · How it's computed
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
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- analytic_hr_department_restriction, hr_address_extended, hr_attendance, hr_calendar, hr_dms_field, hr_employee_cost_history, hr_expense, hr_fleet, hr_gamification, hr_livechat, hr_maintenance, hr_presence, hr_recruitment, hr_skills, hr_timesheet, hr_work_entry, mail_bot_hr, pos_hr, project_department
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 67
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
/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_idsMany2many → hr.departmenthelp='Automatically subscribe members of those departments to the channel.'string='HR Departments' args: 'hr.department'
-
write(self, vals)
New fields (2)
-
allocation_idsOne2many → hr.bank.account.allocation.wizard.linereadonly=Falsestring='Allocations' args: 'hr.bank.account.allocation.wizard.line', 'wizard_id' -
employee_idMany2one → hr.employeerequired=True args: 'hr.employee'
-
action_save(self) -
create(self, vals_list)@api.model_create_multi
New fields (8)
-
account_numberCharreadonly=Truerelated='bank_account_id.account_number' -
amountFloatdigits=(16, 2)readonly=Falsestring='Amount' -
amount_typeSelectionreadonly=Falseselection='_get_amount_type_selection_vals' -
bank_account_idMany2one → res.partner.bankreadonly=Truerequired=True args: 'res.partner.bank' -
sequenceIntegerdefault=10 -
symbolCharcompute='_compute_symbol'readonly=True -
trustedBooleanstring='Trusted' -
wizard_idMany2one → hr.bank.account.allocation.wizardondelete='cascade'required=True args: 'hr.bank.account.allocation.wizard'
-
write(self, vals)
New fields (17)
-
activeBooleandefault=True args: 'Active' -
child_idsOne2many → hr.departmentstring='Child Departments' args: 'hr.department', 'parent_id' -
colorIntegerargs: 'Color Index' -
company_idMany2one → res.companycompute='_compute_company_id'default=<expr>index=Truereadonly=Falserecursive=Truestore=Truestring='Company'tracking=True args: 'res.company' -
complete_nameCharcompute='_compute_complete_name'recursive=Truesearch='_search_complete_name' args: 'Complete Name' -
has_read_accessBooleanexport_string_translation=Falsesearch='_search_has_read_access'store=False -
jobs_idsOne2many → hr.jobstring='Jobs' args: 'hr.job', 'department_id' -
manager_idMany2one → hr.employeedomain="['|', ('company_id', '=', False), ('company_id', 'in', allowed_company_ids)]"string='Manager'tracking=True args: 'hr.employee' -
master_department_idMany2one → hr.departmentcompute='_compute_master_department_id'store=True args: 'hr.department', 'Master Department' -
member_idsOne2many → hr.employeereadonly=Truestring='Members' args: 'hr.employee', 'department_id' -
nameCharrequired=Truetranslate=True args: 'Department Name' -
noteTextargs: 'Note' -
parent_idMany2one → hr.departmentcheck_company=Trueindex=Truestring='Parent Department' args: 'hr.department' -
parent_pathCharindex=True -
plan_idsOne2many → mail.activity.planargs: 'mail.activity.plan', 'department_id' -
plans_countIntegercompute='_compute_plan_count' -
total_employeeIntegercompute='_compute_total_employee'export_string_translation=Falsestring='Total Employee'
-
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)
-
activeBooleandefault=True -
country_codeCharrelated='country_id.code' -
country_idMany2one → res.countrydefault=<expr>string='Country' args: 'res.country' -
nameCharrequired=Truestring='Reason'translate=True -
sequenceIntegerdefault=10 args: 'Sequence'
No public methods.
New fields (148)
-
activeBooleandefault=Truereadonly=Falserelated='resource_id.active'store=True args: 'Active' -
activity_date_deadlineDategroups='hr.group_hr_user' -
activity_exception_decorationSelectiongroups='hr.group_hr_user' -
activity_exception_iconChargroups='hr.group_hr_user' -
activity_idsOne2manygroups='hr.group_hr_user' -
activity_plans_idsMany2manygroups='hr.group_hr_user' -
activity_stateSelectiongroups='hr.group_hr_user' -
activity_summaryChargroups='hr.group_hr_user' -
activity_type_iconChargroups='hr.group_hr_user' -
activity_type_idMany2onegroups='hr.group_hr_user' -
activity_user_idMany2onegroups='hr.group_hr_user' -
additional_noteTextgroups='hr.group_hr_user'string='Additional Note'tracking=True -
ageIntegercompute='_compute_age'groups='hr.group_hr_user' args: 'Age' -
bank_account_idsMany2many → res.partner.bankcolumn1='employee_id'column2='bank_account_id'copy=Falsedomain="[('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' -
barcodeCharcopy=Falsegroups='hr.group_hr_user'help='ID used for employee identification.'string='Badge ID' -
birthdayDategroups='hr.group_hr_user'tracking=True args: 'Birthday' -
birthday_monthSelectioncompute='_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=Truestring='Birthday Month' -
birthday_public_displayBooleandefault=Falsegroups='hr.group_hr_user' args: 'Show Birthday To Employees' -
birthday_public_display_stringCharcompute='_compute_birthday_public_display_string'default='hidden' args: 'Public Date of Birth' -
category_idsMany2many → hr.employee.categorygroups='hr.group_hr_user'string='Tags' args: 'hr.employee.category', 'employee_category_rel', 'employee_id', 'category_id' -
certificateSelectiongroups='hr.group_hr_user'selection='_get_certificate_selection'string='Certificate Level'tracking=True -
child_all_countIntegercompute='_compute_subordinates'compute_sudo=Truerecursive=Truestore=False args: 'Indirect Subordinates Count' -
child_countIntegercompute='_compute_child_count'compute_sudo=Truerecursive=True args: 'Direct Subordinates Count' -
child_idsOne2many → hr.employeedomain=[('active', '=', True)]string='Direct subordinates' args: 'hr.employee', 'parent_id' -
coach_idMany2one → hr.employeecompute='_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=Falsestore=True args: 'hr.employee', 'Coach' -
colorIntegerdefault=0 args: 'Color Index' -
company_country_codeChardepends=['company_country_id']groups='base.group_system,hr.group_hr_user'readonly=Truerelated='company_country_id.code'string='Company Country Code' -
company_country_idMany2one → res.countrygroups='base.group_system,hr.group_hr_user'readonly=Truerelated='company_id.country_id' args: 'res.country', 'Company Country' -
company_idMany2one → res.companyrequired=Truetracking=True args: 'res.company' -
contract_date_endDategroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.contract_date_end' -
contract_date_startDategroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.contract_date_start' -
contract_template_idMany2one → hr.versiongroups='hr.group_hr_user' args: 'hr.version' -
country_of_birthMany2one → res.countrygroups='hr.group_hr_user'string='Country of Birth'tracking=True args: 'res.country' -
currency_idMany2one → res.currencygroups='hr.group_hr_user'readonly=Truerelated='company_id.currency_id' args: 'res.currency' -
current_date_versionDategroups='hr.group_hr_user'related='current_version_id.date_version'string='Current Date Employee Record' -
current_version_idMany2one → hr.versionbypass_search_access=Truecompute='_compute_current_version_id'index=Truestore=Truestring='Current Employee Record' args: 'hr.version' -
date_endDategroups='hr.group_hr_user'inherited=Truerelated='version_id.date_end' -
date_startDategroups='hr.group_hr_user'inherited=Truerelated='version_id.date_start' -
department_colorIntegerrelated='department_id.color' args: 'Department Color' -
departure_action_dateDategroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.departure_action_date' -
departure_apply_dateDategroups='hr.group_hr_user'inherited=Truerelated='version_id.departure_apply_date' -
departure_apply_immediatelyBooleangroups='hr.group_hr_user'inherited=Truerelated='version_id.departure_apply_immediately' -
departure_dateDategroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.departure_date' -
departure_descriptionHtmlgroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.departure_description' -
departure_idMany2onegroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.departure_id' -
departure_reason_idMany2onegroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.departure_reason_id' -
dismissal_dateDategroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.dismissal_date' -
driving_licenseBinarygroups='hr.group_hr_user'string='Driving License' -
driving_license_nameChargroups='hr.group_hr_user' -
emailCharrelated='user_id.email' -
emergency_contactChargroups='hr.group_hr_user'tracking=True -
emergency_phoneChargroups='hr.group_hr_user'tracking=True -
emergency_phone_formattedCharcompute='_compute_restricted_phone_companion_fields'export_string_translation=Falsegroups='hr.group_hr_user'store=False -
emergency_phone_sanitizedCharcompute='_compute_restricted_phone_companion_fields'export_string_translation=Falsegroups='hr.group_hr_user'store=False -
employee_propertiesPropertiesdefinition='company_id.employee_properties_definition'groups='hr.group_hr_user'precompute=False args: 'Properties' -
employee_type_idMany2onegroups='hr.group_hr_manager'inherited=Truereadonly=Falserelated='version_id.employee_type_id' -
exceptional_location_idMany2one → hr.work.locationcompute='_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_dateDatecompute='_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_termBooleangroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.fixed_term' -
friday_location_idMany2one → hr.work.locationindex='btree_not_null'string='Friday' args: 'hr.work.location' -
has_messageBooleangroups='hr.group_hr_user' -
has_multiple_bank_accountsBooleancompute='_compute_has_multiple_bank_accounts'default=Falsegroups='hr.group_hr_user' -
has_work_permitBinarygroups='hr.group_hr_user'string='Work Permit' -
hourly_costMonetarygroups='hr.group_hr_user'tracking=True args: 'Hourly Cost' -
hr_icon_displaySelectioncompute='_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_stateSelectioncompute='_compute_presence_state'compute_sql='_compute_sql_presence_state'compute_sudo=Falsedefault='out_of_working_hour' args: [('present', 'Present'), ('absent', 'Absent'), ('out_of_working_hour', 'Off-Hours')] -
hr_responsible_idMany2onedomain=<expr>groups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.hr_responsible_id' -
id_cardBinarygroups='hr.group_hr_user'string='ID Card Copy' -
id_card_nameChargroups='hr.group_hr_user' -
is_currentBooleangroups='hr.group_hr_user'inherited=Truerelated='version_id.is_current' -
is_futureBooleangroups='hr.group_hr_user'inherited=Truerelated='version_id.is_future' -
is_in_contractBooleangroups='hr.group_hr_user'inherited=Truerelated='version_id.is_in_contract' -
is_pastBooleangroups='hr.group_hr_user'inherited=Truerelated='version_id.is_past' -
is_subordinateBooleancompute='_compute_is_subordinate'search='_search_is_subordinate' -
is_trusted_bank_accountBooleancompute='_compute_is_trusted_bank_account'groups='hr.group_hr_user' -
langSelectiongroups='hr.group_hr_user'selection=_lang_getstring='Lang' -
last_activityDatecompute='_compute_last_activity' -
last_activity_timeCharcompute='_compute_last_activity' -
legal_nameCharcompute='_compute_legal_name'groups='hr.group_hr_user'help="The employee's official name as per government-issued or legal documents."readonly=Falsestore=True -
message_attachment_countIntegergroups='hr.group_hr_user' -
message_follower_idsOne2manygroups='hr.group_hr_user' -
message_has_errorBooleangroups='hr.group_hr_user' -
message_has_error_counterIntegergroups='hr.group_hr_user' -
message_idsOne2manygroups='hr.group_hr_user' -
message_is_followerBooleangroups='hr.group_hr_user' -
message_main_attachment_idMany2onegroups='hr.group_hr_user' -
message_needactionBooleangroups='hr.group_hr_user' -
message_needaction_counterIntegergroups='hr.group_hr_user' -
message_partner_idsMany2manygroups='hr.group_hr_user' -
mobile_phoneCharargs: 'Work Mobile' -
mobile_phone_formattedCharcompute='_compute_phone_companion_fields'export_string_translation=Falsestore=False -
mobile_phone_sanitizedCharcompute='_compute_phone_companion_fields'export_string_translation=Falsestore=False -
monday_location_idMany2one → hr.work.locationindex='btree_not_null'string='Monday' args: 'hr.work.location' -
my_activity_date_deadlineDategroups='hr.group_hr_user' -
nameCharreadonly=Falserelated='resource_id.name'store=Truestring='Employee Name'tracking=True -
nationality_country_codeChargroups='hr.group_hr_user'related='version_id.country_id.code'string='Nationality' -
newly_hiredBooleancompute='_compute_newly_hired'search='_search_newly_hired' args: 'Newly Hired' -
parent_company_idMany2onegroups='hr.group_hr_user'readonly=Truerelated='company_id.parent_id' -
parent_idMany2one → hr.employeedomain="['|', ('company_id', '=', False), ('company_id', 'in', allowed_company_ids)]"index=Truetracking=True args: 'hr.employee', 'Manager' -
permit_noChargroups='hr.group_hr_user'tracking=True args: 'Work Permit No' -
phoneCharrelated='user_id.phone' -
phone_blacklistedBooleangroups='hr.group_hr_user' -
phone_mobile_searchChargroups='hr.group_hr_user' -
phone_sanitized_blacklistedBooleangroups='hr.group_hr_user' -
pinCharcopy=Falsegroups='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_birthChargroups='hr.group_hr_user'tracking=True args: 'Place of Birth' -
primary_bank_account_idMany2one → res.partner.bankcompute='_compute_primary_bank_account_id'groups='hr.group_hr_user' args: 'res.partner.bank' -
private_emailChargroups='hr.group_hr_user'string='Private Email' -
private_phoneChargroups='hr.group_hr_user'string='Private Phone' -
private_phone_formattedCharcompute='_compute_restricted_phone_companion_fields'export_string_translation=Falsegroups='hr.group_hr_user'store=False -
private_phone_sanitizedCharcompute='_compute_restricted_phone_companion_fields'export_string_translation=Falsegroups='hr.group_hr_user'store=False -
related_partners_countIntegercompute='_compute_related_partners_count'groups='hr.group_hr_user' -
resource_calendar_idMany2onedomain="['|', ('company_id', '=', False), ('company_id.id', 'parent_of', company_id)]"index=Falseinherited=Truerelated='version_id.resource_calendar_id'store=False -
resource_idMany2one → resource.resourcerequired=True args: 'resource.resource' -
salary_distributionJsoncompute='_sync_salary_distribution'groups='hr.group_hr_user'readonly=Falsestore=Truestring='Salary Distribution' -
saturday_location_idMany2one → hr.work.locationindex='btree_not_null'string='Saturday' args: 'hr.work.location' -
shareBooleanrelated='user_id.share' -
show_hr_icon_displayBooleancompute='_compute_presence_icon' -
split_legal_nameBooleancompute='_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_idMany2onegroups='hr.group_hr_manager'inherited=Truereadonly=Falserelated='version_id.structure_type_id' -
study_fieldChargroups='hr.group_hr_user'tracking=True args: 'Field of Study' -
subordinate_idsOne2many → hr.employeecompute='_compute_subordinates'compute_sudo=Truehelp='Direct and indirect subordinates'string='Subordinates' args: 'hr.employee' -
sunday_location_idMany2one → hr.work.locationindex='btree_not_null'string='Sunday' args: 'hr.work.location' -
thursday_location_idMany2one → hr.work.locationindex='btree_not_null'string='Thursday' args: 'hr.work.location' -
today_location_nameChar -
trial_date_endDategroups='hr.group_hr_user'inherited=Truereadonly=Falserelated='version_id.trial_date_end' -
tuesday_location_idMany2one → hr.work.locationindex='btree_not_null'string='Tuesday' args: 'hr.work.location' -
tzSelectioninherited=Truereadonly=Falserelated='version_id.tz'tracking=True -
user_idMany2one → res.userscheck_company=Truecopy=Falseindex='btree_not_null'ondelete='restrict'precompute=Truereadonly=Falserelated='resource_id.user_id'store=True args: 'res.users', 'User' -
user_partner_idMany2onerelated='user_id.partner_id'related_sudo=Falsestring="User's partner" -
user_stateSelectiongroups='hr.group_hr_user'related='user_id.state'string='User Status' -
version_idMany2one → hr.versioncompute='_compute_version_id'compute_sql='_compute_sql_version_id'compute_sudo=Trueondelete='cascade'required=Truesearch='_search_version_id'store=Falsestring='Employee Record' args: 'hr.version' -
version_idsOne2many → hr.versiongroups='hr.group_hr_user'required=Truestring='Employee Records' args: 'hr.version', 'employee_id' -
version_revisionCharcompute='_compute_version_revision'groups='hr.group_hr_user' -
versions_countIntegercompute='_compute_versions_count'groups='hr.group_hr_user'string='Employee Records Count' -
visa_expireDategroups='hr.group_hr_user'tracking=True args: 'Visa Expiration Date' -
visa_noChargroups='hr.group_hr_user'tracking=True args: 'Visa No' -
wednesday_location_idMany2one → hr.work.locationindex='btree_not_null'string='Wednesday' args: 'hr.work.location' -
work_contact_idMany2one → res.partnercopy=Falseindex='btree_not_null' args: 'res.partner', 'Work Contact' -
work_emailCharcompute='_compute_work_contact_details'inverse='_inverse_work_contact_details'store=True args: 'Work Email' -
work_location_nameCharcompute='_compute_work_location_name' args: 'Work Location Name' -
work_location_typeSelectioncompute='_compute_work_location_type'tracking=True args: [('home', 'Home'), ('office', 'Office'), ('other', 'Other')] -
work_permit_expiration_dateDategroups='hr.group_hr_user'tracking=True args: 'Work Permit Expiration Date' -
work_permit_nameCharcompute='_compute_work_permit_name'groups='hr.group_hr_user' args: 'work_permit_name' -
work_permit_scheduled_activityBooleandefault=Falsegroups='hr.group_hr_user' -
work_phoneCharcompute='_compute_work_contact_details'inverse='_inverse_work_contact_details'readonly=Falsestore=Truetracking=True args: 'Work Phone' -
work_phone_formattedCharcompute='_compute_phone_companion_fields'export_string_translation=Falsestore=False -
work_phone_sanitizedCharcompute='_compute_phone_companion_fields'export_string_translation=Falsestore=False
-
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_multiCreate 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.modelDetect 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.modelReturn the ``hr.employee.public`` view for users without read access to ``hr.employee``. -
get_views(self, views, options=None)@api.modelReturn 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.modelCreate 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.modelSchedule "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.modelSearch 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)
-
colorIntegerdefault=_get_default_colorstring='Color Index' -
employee_idsMany2many → hr.employeestring='Employees' args: 'hr.employee', 'employee_category_rel', 'category_id', 'employee_id' -
nameCharrequired=Truestring='Tag Name'
No public methods.
New fields (2)
-
date_versionDaterequired=Truestring='Start Date' -
employee_countIntegercompute='_compute_employee_count'readonly=True
-
action_create_versions(self)
New fields (11)
-
action_dateDatecompute='_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=Truestring='Archive Employee On' -
apply_dateDatereadonly=True -
apply_immediatelyBooleancompute='_compute_apply_immediately' -
country_codeCharrelated='employee_id.company_id.partner_id.country_id.code' -
departure_dateDatecompute='_compute_departure_date'help='Date at which the departure actually takes place.'readonly=Falsestore=Truestring='Departure Date' -
departure_descriptionHtmlstring='Additional Information' -
departure_reason_idMany2one → hr.departure.reasondefault=<expr>domain=<expr>index=Trueondelete='restrict'required=Truestring='End Reason' args: 'hr.departure.reason' -
dismissal_dateDatedefault=fields.Date.todayhelp='Date at which the departure process starts. Differs from the actual departure date in case of a notice period.'required=Truestring='Dismissal Date' -
employee_idMany2one → hr.employeedefault=_get_default_employee_iddomain=<expr>index=Trueondelete='cascade'required=Truestring='Employee' args: 'hr.employee' -
is_user_employeeBooleancompute='_compute_is_user_employee'export_string_translation=False -
last_contract_date_endDate
-
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_multiCreate 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)
-
dateDatestring='Date' -
day_week_stringCharcompute='_compute_day_week_string' -
employee_idMany2one → hr.employeedefault=<expr>ondelete='cascade'required=True args: 'hr.employee' -
employee_nameCharrelated='employee_id.name' -
work_location_idMany2one → hr.work.locationindex=Truerequired=Truestring='Location' args: 'hr.work.location' -
work_location_nameCharrelated='work_location_id.name'string='Location name' -
work_location_typeSelectionrelated='work_location_id.location_type'
No public methods.
New fields (70)
-
activeBooleanreadonly=True -
address_idMany2one → res.partnerreadonly=True args: 'res.partner' -
avatar_1024Imagecompute_sudo=Truerelated='employee_id.avatar_1024' args: 'Avatar 1024' -
avatar_128Imagecompute_sudo=Truerelated='employee_id.avatar_128' args: 'Avatar 128' -
avatar_1920Imagecompute_sudo=Truerelated='employee_id.avatar_1920' args: 'Avatar' -
avatar_256Imagecompute_sudo=Truerelated='employee_id.avatar_256' args: 'Avatar 256' -
avatar_512Imagecompute_sudo=Truerelated='employee_id.avatar_512' args: 'Avatar 512' -
birthday_public_display_stringCharrelated='employee_id.birthday_public_display_string' args: 'Public Date of Birth' -
child_all_countIntegercompute='_compute_child_all_count' -
child_countIntegercompute='_compute_child_count' -
child_idsOne2many → hr.employee.publicreadonly=Truestring='Direct subordinates' args: 'hr.employee.public', 'parent_id' -
coach_idMany2one → hr.employee.publicreadonly=True args: 'hr.employee.public', 'Coach' -
colorIntegerreadonly=True -
company_idMany2one → res.companyreadonly=True args: 'res.company' -
country_codeCharcompute='_compute_country_code' -
create_dateDatetimereadonly=True -
department_colorIntegercompute='_compute_department_color' -
department_idMany2one → hr.departmentreadonly=True args: 'hr.department' -
emailCharrelated='employee_id.email' -
employee_idMany2one → hr.employeereadonly=True args: 'hr.employee', 'Employee' -
friday_location_idMany2one → hr.work.locationstring='Friday' args: 'hr.work.location' -
hours_per_dayFloatcompute='_compute_hours_per_day' -
hours_per_weekFloatcompute='_compute_hours_per_week' -
hr_icon_displaySelectioncompute='_compute_presence_icon'selection='_get_selection_hr_icon_display' -
hr_presence_stateSelectioncompute='_compute_presence_state'default='out_of_working_hour' args: [('present', 'Present'), ('absent', 'Absent'), ('out_of_working_hour', 'Off-Hours')] -
image_1024Imagecompute_sudo=Truerelated='employee_id.image_1024' args: 'Image 1024' -
image_128Imagecompute_sudo=Truerelated='employee_id.image_128' args: 'Image 128' -
image_1920Imagecompute_sudo=Truerelated='employee_id.image_1920' args: 'Image' -
image_256Imagecompute_sudo=Truerelated='employee_id.image_256' args: 'Image 256' -
image_512Imagecompute_sudo=Truerelated='employee_id.image_512' args: 'Image 512' -
is_managerBooleancompute='_compute_is_manager' -
is_subordinateBooleanrelated='employee_id.is_subordinate' -
is_userBooleancompute='_compute_is_user' -
job_idMany2one → hr.jobreadonly=True args: 'hr.job' -
job_titleCharreadonly=True -
last_activityDatecompute='_compute_last_activity' -
last_activity_timeCharcompute='_compute_last_activity' -
member_of_departmentBooleancompute='_compute_member_of_department'search='_search_part_of_department' -
mobile_phoneCharreadonly=True -
mobile_phone_formattedCharrelated='employee_id.mobile_phone_formatted' -
mobile_phone_sanitizedCharrelated='employee_id.mobile_phone_sanitized' -
monday_location_idMany2one → hr.work.locationstring='Monday' args: 'hr.work.location' -
nameCharreadonly=True -
newly_hiredBooleancompute='_compute_newly_hired'search='_search_newly_hired' args: 'Newly Hired' -
parent_idMany2one → hr.employee.publicreadonly=True args: 'hr.employee.public', 'Manager' -
phoneCharrelated='employee_id.phone' -
phone_formattedCharrelated='employee_id.phone_formatted' -
phone_sanitizedCharreadonly=True -
resource_calendar_idMany2one → resource.calendarreadonly=True args: 'resource.calendar' -
resource_idMany2one → resource.resourcereadonly=True args: 'resource.resource' -
saturday_location_idMany2one → hr.work.locationstring='Saturday' args: 'hr.work.location' -
shareBooleanrelated='employee_id.share' -
show_hr_icon_displayBooleancompute='_compute_presence_icon' -
subordinate_idsOne2manycompute_sudo=Truerelated='employee_id.subordinate_ids' -
sunday_location_idMany2one → hr.work.locationstring='Sunday' args: 'hr.work.location' -
thursday_location_idMany2one → hr.work.locationstring='Thursday' args: 'hr.work.location' -
today_location_nameChar -
tuesday_location_idMany2one → hr.work.locationstring='Tuesday' args: 'hr.work.location' -
tzSelectionrelated='resource_id.tz' -
user_idMany2one → res.usersreadonly=True args: 'res.users' -
user_partner_idMany2onerelated='user_id.partner_id'related_sudo=Falsestring="User's partner" -
wednesday_location_idMany2one → hr.work.locationstring='Wednesday' args: 'hr.work.location' -
work_contact_idMany2one → res.partnerreadonly=True args: 'res.partner' -
work_emailCharreadonly=True -
work_location_idMany2one → hr.work.locationreadonly=True args: 'hr.work.location' -
work_location_nameCharrelated='employee_id.work_location_name' -
work_location_typeSelectionrelated='employee_id.work_location_type' -
work_phoneCharreadonly=True -
work_phone_formattedCharrelated='employee_id.work_phone_formatted' -
work_phone_sanitizedCharrelated='employee_id.work_phone_sanitized'
-
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)
-
codeCharcompute='_compute_code'readonly=Falsestore=True -
company_idMany2one → res.companystring='Company' args: 'res.company' -
country_codeCharrelated='country_id.code' -
country_idMany2one → res.countrydomain=<expr> args: 'res.country' -
employee_idsOne2many → hr.employeestring='Related Employees' args: 'hr.employee', 'employee_type_id' -
employees_countIntegercompute='_compute_employee_count'string='Employees' -
nameCharrequired=Truetranslate=True -
sequenceIntegerdefault=10
-
action_open_employees(self)
New fields (14)
-
activeBooleandefault=True -
company_country_codeChardepends=['company_id.country_id']related='company_id.country_id.code' -
company_idMany2one → res.companydefault=<expr>domain=<expr>index=Truerequired=Truestring='Company'tracking=True args: 'res.company' -
department_idMany2one → hr.departmentcheck_company=Trueindex='btree_not_null'string='Department'tracking=True args: 'hr.department' -
descriptionHtmlsanitize_attributes=Falsestring='Job Description' -
employee_idsOne2many → hr.employeegroups='base.group_user'string='Employees' args: 'hr.employee', 'job_id' -
employee_type_idMany2one → hr.employee.typestring='Employee Type'tracking=True args: 'hr.employee.type' -
expected_employeesIntegercompute='_compute_employees'groups='hr.group_hr_user'help='Expected number of employees for this job position after new recruitment.'string='Total Forecasted Employees' -
nameCharindex='trigram'required=Truestring='Job Position'translate=True -
no_of_employeeIntegercompute='_compute_employees'groups='hr.group_hr_user'help='Number of employees currently occupying this job position.'string='Current Number of Employees' -
no_of_recruitmentIntegercopy=Falsedefault=1help='Number of new employees you expect to recruit.'string='Target' -
recruiter_idMany2one → hr.employeecheck_company=Truedefault=<expr>domain=_recruiter_domainhelp='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=Truetracking=True args: 'hr.employee', 'Recruiter' -
requirementsTextgroups='hr.group_hr_user' args: 'Requirements' -
sequenceIntegerdefault=10
-
create(self, vals_list)@api.model_create_multiWe don't want the current user to be follower of all created job -
write(self, vals)
New fields (2)
-
employee_idMany2one → hr.employeereadonly=Truestring='Employee' args: 'hr.employee' -
has_department_manager_accessBooleancompute='_compute_has_department_manager_access'search='_search_has_department_manager_access'
No public methods.
New fields (4)
-
country_codeCharrelated='country_id.code' -
country_idMany2one → res.countrydefault=<expr>domain=<expr>string='Country' args: 'res.country' -
default_resource_calendar_idMany2one → resource.calendardefault=<expr>domain=<expr>string='Working Hours' args: 'resource.calendar' -
nameCharargs: 'Salary Structure Type'
No public methods.
New fields (63)
-
activeBooleandefault=Truetracking=1 -
active_employeeBooleangroups='hr.group_hr_user'related='employee_id.active'string='Active Employee' -
address_idMany2one → res.partnercheck_company=Truecompute='_compute_address_id'index='btree_not_null'readonly=Falsestore=Truestring='Work Address'tracking=1 args: 'res.partner' -
allowed_country_state_idsMany2many → res.country.statecompute='_compute_allowed_country_state_ids'groups='hr.group_hr_user' args: 'res.country.state' -
childrenIntegergroups='hr.group_hr_user'string='Dependent Children'tracking=1 -
company_country_idMany2one → res.countryreadonly=Truerelated='company_id.country_id'string='Company country' args: 'res.country' -
company_idMany2one → res.companycompute='_compute_company_id'default=<expr>index=Truereadonly=Falsestore=Truetracking=1 args: 'res.company' -
contract_date_endDategroups='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_startDategroups='hr.group_hr_user'tracking=1 args: 'Contract Start Date' -
contract_template_idMany2one → hr.versiondomain="[('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_codeChardepends=['company_country_id']readonly=Truerelated='company_country_id.code' -
country_idMany2one → res.countrygroups='hr.group_hr_user'index='btree_not_null'tracking=1 args: 'res.country', 'Nationality (Country)' -
currency_idMany2onereadonly=Truerelated='company_id.currency_id'string='Currency' -
date_endDatecompute='_compute_dates'groups='hr.group_hr_user'search='_search_end_date' -
date_startDatecompute='_compute_dates'groups='hr.group_hr_user'search='_search_start_date' -
date_versionDatedefault=fields.Date.context_todaygroups='hr.group_hr_user'required=Truestring='Effective Date'tracking=1 -
department_idMany2one → hr.departmentcheck_company=Trueindex=Truetracking=1 args: 'hr.department' -
departure_action_dateDategroups='hr.group_hr_user'readonly=Falserelated='departure_id.action_date' -
departure_apply_dateDategroups='hr.group_hr_user'related='departure_id.apply_date' -
departure_apply_immediatelyBooleangroups='hr.group_hr_user'related='departure_id.apply_immediately' -
departure_dateDategroups='hr.group_hr_user'readonly=Falserelated='departure_id.departure_date'tracking=1 -
departure_descriptionHtmlgroups='hr.group_hr_user'readonly=Falserelated='departure_id.departure_description' -
departure_idMany2one → hr.employee.departurecopy=Falseindex='btree_not_null'string='Departure' args: 'hr.employee.departure' -
departure_reason_idMany2onegroups='hr.group_hr_user'readonly=Falserelated='departure_id.departure_reason_id'tracking=1 -
dismissal_dateDategroups='hr.group_hr_user'readonly=Falserelated='departure_id.dismissal_date'tracking=1 -
display_nameCharcompute='_compute_display_name' -
distance_home_workIntegergroups='hr.group_hr_user'string='Home-Work Distance'tracking=1 -
distance_home_work_unitSelectiondefault='kilometers'groups='hr.group_hr_user'required=Truetracking=1 args: [('kilometers', 'km'), ('miles', 'mi')], 'Home-Work Distance unit' -
employee_idMany2one → hr.employeedomain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]"index=Trueondelete='cascade'string='Employee'tracking=1 args: 'hr.employee' -
employee_type_idMany2one → hr.employee.typegroups='hr.group_hr_manager'index=Truetracking=1 args: 'hr.employee.type', 'Employee Type' -
fixed_termBooleangroups='hr.group_hr_user'tracking=1 args: 'Fixed Term' -
hr_responsible_idMany2one → res.usersdefault=<expr>domain=<expr>groups='hr.group_hr_user'help="Person responsible for validating the employee's contracts."required=Truetracking=1 args: 'res.users', 'HR Responsible' -
identification_idChargroups='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_currentBooleancompute='_compute_is_current'groups='hr.group_hr_user' -
is_custom_job_titleBooleancompute='_compute_is_custom_job_title'default=Falsegroups='hr.group_hr_user'store=True -
is_futureBooleancompute='_compute_is_future'groups='hr.group_hr_user' -
is_in_contractBooleancompute='_compute_is_in_contract'groups='hr.group_hr_user' -
is_pastBooleancompute='_compute_is_past'groups='hr.group_hr_user' -
job_idMany2one → hr.jobcheck_company=Trueindex=Truetracking=1 args: 'hr.job' -
job_titleCharcompute='_compute_job_title'inverse='_inverse_job_title'readonly=Falsestore=Truestring='Job Title'tracking=True -
km_home_workIntegercompute='_compute_km_home_work'groups='hr.group_hr_user'inverse='_inverse_km_home_work'store=Truestring='Home-Work Distance in Km'tracking=1 -
last_modified_dateDatetimedefault=fields.Datetime.nowgroups='hr.group_hr_user'required=Truestring='Last Modified on' -
last_modified_uidMany2one → res.usersdefault=<expr>groups='hr.group_hr_user'required=Truestring='Last Modified by' args: 'res.users' -
maritalSelectiondefault='single'groups='hr.group_hr_user'required=Trueselection='_get_marital_status_selection'string='Marital Status'tracking=1 -
member_of_departmentBooleancompute='_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' -
nameChartracking=1 -
passport_expiration_dateDategroups='hr.group_hr_user'tracking=1 args: 'Passport Expiration Date' -
passport_idChargroups='hr.group_hr_user'tracking=1 args: 'Passport No' -
private_cityChargroups='hr.group_hr_user'string='Private City'tracking=1 -
private_country_idMany2one → res.countrydefault=<expr>groups='hr.group_hr_user'index='btree_not_null'string='Private Country'tracking=1 args: 'res.country' -
private_state_idMany2one → res.country.statedomain="[('id', 'in', allowed_country_state_ids)]"groups='hr.group_hr_user'string='Private State'tracking=1 args: 'res.country.state' -
private_streetChargroups='hr.group_hr_user'string='Private Street'tracking=1 -
private_street2Chargroups='hr.group_hr_user'string='Private Street2'tracking=1 -
private_zipChargroups='hr.group_hr_user'string='Private Zip'tracking=1 -
resource_calendar_idMany2one → resource.calendardefault=<expr>domain="['|', ('company_id', '=', False), ('company_id.id', 'parent_of', company_id)]"index='btree_not_null'inverse='_inverse_resource_calendar_id'required=Truestring='Working Hours'tracking=1 args: 'resource.calendar' -
sexSelectiongroups='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_birthdateDategroups='hr.group_hr_user'string='Spouse Birthdate'tracking=1 -
spouse_complete_nameChargroups='hr.group_hr_user'string='Spouse Legal Name'tracking=1 -
structure_type_idMany2one → hr.payroll.structure.typecompute='_compute_structure_type_id'default=_default_salary_structuregroups='hr.group_hr_manager'index='btree_not_null'readonly=Falsestore=Truestring='Salary Structure Type'tracking=1 args: 'hr.payroll.structure.type' -
trial_date_endDategroups='hr.group_hr_user'help='End date of the trial period (if there is one).'tracking=1 args: 'End of Trial Period' -
tzSelectiondefault=<expr>required=Truestring='Timezone' args: _tz_get -
wageMonetaryaggregator='avg'groups='hr.group_hr_manager'help="Employee's monthly gross wage."tracking=1 args: 'Wage' -
work_location_idMany2one → hr.work.locationcompute='_compute_work_location_id'index=Truereadonly=Falsestore=Truetracking=1 args: 'hr.work.location', 'Work Location'
-
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_multiCreate 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)
-
activeBooleandefault=True -
address_idMany2one → res.partnercheck_company=Truedefault=<expr>index='btree_not_null'string='Work Address' args: 'res.partner' -
company_idMany2one → res.companydefault=<expr>index=Truerequired=True args: 'res.company' -
country_codeChardepends=['company_id']related='company_id.country_id.code' -
currency_idMany2one → res.currencyrelated='company_id.currency_id' args: 'res.currency' -
iconCharcompute='_compute_icon' -
location_numberChar -
location_typeSelectiondefault='office'required=Truestring='Location Type' args: [('home', 'Home'), ('office', 'Office'), ('other', 'Other')] -
nameCharrequired=Truestring='Work Location'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (1)
-
technical_usageSelectionselection_add=[('hr_expiring_contract', 'Expiring Contract'), ('hr_expiring_work_permit', 'Expiring Work Permit')]
No public methods.
New fields (2)
-
department_assignableBooleancompute='_compute_department_assignable' -
department_idMany2one → hr.departmentcheck_company=Truecompute='_compute_department_id'index='btree_not_null'ondelete='cascade'readonly=Falsestore=True args: 'hr.department'
No public methods.
New fields (1)
-
responsible_typeSelectionondelete={'manager': 'cascade', 'employee': 'cascade'}selection_add=[('manager', 'Manager'), ('employee', 'Employee')]
No public methods.
New fields (2)
-
department_idMany2one → hr.departmentcompute='_compute_department_id' args: 'hr.department' -
plan_department_filterableBooleancompute='_compute_plan_department_filterable'
No public methods.
New fields (1)
-
alias_contactSelectionondelete={'employees': 'cascade'}selection_add=[('employees', 'Authenticated Employees')]
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (9)
-
contract_expiration_notice_periodIntegerdefault=7 args: 'Contract Expiry Notice Period' -
employee_properties_definitionPropertiesDefinitionargs: 'Employee Properties' -
hr_presence_control_attendanceBooleandefault=<expr>string='Based on attendances' -
hr_presence_control_emailBooleanstring='Based on number of emails sent' -
hr_presence_control_email_amountIntegerstring='# emails to send' -
hr_presence_control_ipBooleanstring='Based on IP Address' -
hr_presence_control_ip_listCharstring='Valid IP addresses' -
hr_presence_control_loginBooleandefault=Truestring='Based on user status in system' -
work_permit_expiration_notice_periodIntegerdefault=60 args: 'Work Permit Expiry Notice Period'
No public methods.
New fields (12)
-
company_tzSelectionreadonly=Falserelated='company_id.tz'string='Company Timezone' -
contract_expiration_notice_periodIntegerreadonly=Falserelated='company_id.contract_expiration_notice_period'string='Contract Expiry Notice Period' -
hr_presence_control_attendanceBooleanreadonly=Falserelated='company_id.hr_presence_control_attendance' -
hr_presence_control_emailBooleanreadonly=Falserelated='company_id.hr_presence_control_email' -
hr_presence_control_email_amountIntegerreadonly=Falserelated='company_id.hr_presence_control_email_amount' -
hr_presence_control_ipBooleanreadonly=Falserelated='company_id.hr_presence_control_ip' -
hr_presence_control_ip_listCharreadonly=Falserelated='company_id.hr_presence_control_ip_list' -
hr_presence_control_loginBooleanreadonly=Falserelated='company_id.hr_presence_control_login' -
module_hr_presenceBooleanstring='Advanced Presence Control' -
module_hr_skillsBooleanstring='Skills Management' -
resource_calendar_idMany2one → resource.calendarreadonly=Falserelated='company_id.resource_calendar_id' args: 'resource.calendar', 'Company Working Hours' -
work_permit_expiration_notice_periodIntegerreadonly=Falserelated='company_id.work_permit_expiration_notice_period'string='Work Permit Expiry Notice Period'
-
set_values(self)
New fields (3)
-
employeeBooleancompute='_compute_employee'copy=Falsehelp='Whether this contact is an Employee.'readonly=Falsestore=True -
employee_idsOne2many → hr.employeegroups='hr.group_hr_user'help='Related employees based on their private address'string='Employees' args: 'hr.employee', 'work_contact_id' -
employees_countIntegercompute='_compute_employees_count'groups='hr.group_hr_user'
-
action_open_employees(self)
New fields (5)
-
currency_symbolCharrelated='employee_id.currency_id.symbol' -
employee_has_multiple_bank_accountsBooleanrelated='employee_id.has_multiple_bank_accounts' -
employee_idMany2many → hr.employeecompute='_compute_employee_id'search='_search_employee_id' args: 'hr.employee', 'Employee' -
employee_salary_amountFloatcompute='_compute_salary_amount'digits=(16, 4)readonly=Truestore=Falsestring='Salary Allocation' -
employee_salary_amount_is_percentageBooleancompute='_compute_salary_amount'readonly=Truestore=False
-
action_open_allocation_wizard(self)
New fields (46)
-
additional_noteTextuser_writeable=True -
all_employee_idsOne2many → hr.employeestring='Related employees from all companies' args: 'hr.employee', 'user_id' -
bank_account_idsMany2many → res.partner.bankargs: 'res.partner.bank' -
barcodeCharuser_writeable=True -
birthdayDateuser_writeable=True -
birthday_public_displayBooleanuser_writeable=True -
category_idsMany2many → hr.employee.categoryuser_writeable=True args: 'hr.employee.category' -
create_employeeBooleancopy=Falsedefault=Falsestore=Falsestring='Technical field, whether to create an employee' -
create_employee_idMany2one → hr.employeecopy=Falsestore=Falsestring='Technical field, bind user to this employee on create' args: 'hr.employee' -
department_idMany2onerelated='employee_id.department_id'string='Department' -
emergency_contactCharuser_writeable=True -
emergency_phoneCharuser_writeable=True -
employee_bank_account_idsMany2many → res.partner.bankuser_writeable=True args: 'res.partner.bank' -
employee_countIntegercompute='_compute_employee_count' -
employee_idMany2one → hr.employeecompute='_compute_company_employee'readonly=Truesearch='_search_company_employee'string='Company employee' args: 'hr.employee' -
employee_idsOne2many → hr.employeedomain=_employee_ids_domainstring='Related employee' args: 'hr.employee', 'user_id' -
employee_public_idsOne2many → hr.employee.publicdomain=_employee_ids_domainreadonly=Truestring='Related employee (public)' args: 'hr.employee.public', 'user_id' -
employee_resource_calendar_idMany2onereadonly=Truerelated='employee_id.resource_calendar_id'string="Employee's Working Hours" -
friday_location_idMany2one → hr.work.locationuser_writeable=True args: 'hr.work.location' -
is_hr_userBooleancompute='_compute_is_hr_user' -
is_systemBooleancompute='_compute_is_system' -
job_titleCharuser_writeable=True -
km_home_workIntegeruser_writeable=True -
mobile_phoneCharuser_writeable=True -
monday_location_idMany2one → hr.work.locationuser_writeable=True args: 'hr.work.location' -
pinCharuser_writeable=True -
private_cityCharuser_writeable=True -
private_country_idMany2one → res.countryuser_writeable=True args: 'res.country' -
private_emailCharuser_writeable=True -
private_phoneCharuser_writeable=True -
private_state_idMany2one → res.country.statedomain="[('country_id', '=?', private_country_id)]"user_writeable=True args: 'res.country.state' -
private_streetCharuser_writeable=True -
private_street2Charuser_writeable=True -
private_zipCharuser_writeable=True -
saturday_location_idMany2one → hr.work.locationuser_writeable=True args: 'hr.work.location' -
sunday_location_idMany2one → hr.work.locationuser_writeable=True args: 'hr.work.location' -
thursday_location_idMany2one → hr.work.locationuser_writeable=True args: 'hr.work.location' -
tuesday_location_idMany2one → hr.work.locationuser_writeable=True args: 'hr.work.location' -
visa_expireDateuser_writeable=True -
wednesday_location_idMany2one → hr.work.locationuser_writeable=True args: 'hr.work.location' -
work_contact_idMany2one → res.partnerargs: 'res.partner' -
work_emailCharuser_writeable=True -
work_location_idMany2one → hr.work.locationuser_writeable=True args: 'hr.work.location' -
work_location_nameCharrelated='employee_id.work_location_name' -
work_location_typeSelectionrelated='employee_id.work_location_type' -
work_phoneCharuser_writeable=True
-
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_multiCreate 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_countIntegercompute='_compute_employees_count'string='Employees Count' -
material_resources_countIntegercompute='_compute_material_resources_count'string='Material Resources Count' -
version_idsOne2many → hr.versioncopy=Falsereadonly=True args: 'hr.version', 'resource_calendar_id'
-
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_idMany2onecompute='_compute_calendar_id'inverse='_inverse_calendar_id'readonly=Falsestore=True -
department_idMany2one → hr.departmentcompute='_compute_department_id'compute_sudo=True args: 'hr.department' -
employee_idOne2many → hr.employeecheck_company=Truecontext={'active_test': False} args: 'hr.employee', 'resource_id' -
hr_icon_displaySelectionrelated='employee_id.hr_icon_display' -
job_titleCharcompute='_compute_job_title'compute_sudo=True -
show_hr_icon_displayBooleanrelated='employee_id.show_hr_icon_display' -
tzSelectioncompute='_compute_tz'inverse='_inverse_tz'readonly=Falsestore=True -
user_idMany2onecopy=False -
work_emailCharrelated='employee_id.work_email' -
work_location_idMany2onerelated='employee_id.work_location_id' -
work_phoneCharrelated='employee_id.work_phone'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…