Repository
odoo/odoo · module folder
Module version
1.0
Category
Human Resources/Contracts
Folder size
2.53 MB
License
LGPL-3
Application
Yes
Auto-installable
No
Website
https://www.odoo.com/app/employees
Last tracking update
2026-08-15 22:24:36
Authors
Maintainers
None
Committers
Xavier ALT, Raphael Collet, Christophe Simonis, Thibault Delavallée, Martin Trigaux, Odoo Translation Bot, Damien Bouvy, Yannick Tivisse, Odoo Online, Pierre Masereel, Adrien Dieudonné, Nasreddin Boulif (bon), Prakash Prajapati, Rémy Voet (ryv), Tiffany Chang (tic), Gorash, sofiagvaladze, Florian Damhaut, Audric Onockx (auon), Dossogne Bertrand, bve-odoo, Louis Wicket (wil), Pierre-Yves Dufays, Levi Siuzdak (sile), Dylan Kiss (dyki), Mattis Megevand (mmeg), omra-odoo, Paul Stroobant, Mélanie, Youssef Bashandy, ravb-odoo, Maryam Kia, jugj-odoo, Flotchet, Julien Carion (juca), Ahmad (khah), Louis (wil), sami odoo, Abdelrahman Mahmoud (amah), sapp-odoo, Kacper Gasior, Chris Duvivier, laro-odoo, Pierre Pulinckx (pipu), Ajit Singh, kareem, dhka-odoo, Einar Andersen (eian), assh-odoo, arpr-odoo, Arthur Pierrot
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
hr_collective_agreement, hr_contract_document, hr_contract_employee_calendar_planning, hr_contract_reference, hr_contract_renew, hr_contract_update_overtime, hr_employee_service_contract, hr_holidays_contract, hr_job_category, hr_professional_category, hr_work_entry_contract, l10n_br_hr_contract, payroll, payroll_contract_advantages, test_hr_contract_calendar
Description
Add all information on the employee form to manage contracts.
=============================================================

    * Contract
    * Place of Birth,
    * Medical Examination Date
    * Company Vehicle

You can assign several contracts per employee.
    

Code Analysis

Views touched (22)
XML IDNameModelTypeStatus
hr_contract_history_view_form hr.contract.history.form hr.contract.history form New
hr_contract_history_view_kanban hr.contract.history.view.kanban hr.contract.history kanban New
hr_contract_history_view_list hr.contract.history.list hr.contract.history list New
hr_contract_history_view_search hr.contract.history.search hr.contract.history search New
hr_contract_view_activity hr.contract.activity hr.contract activity New
hr_contract_view_form hr.contract.form hr.contract form New
hr_contract_view_kanban hr.contract.kanban hr.contract kanban New
hr_contract_view_search hr.contract.search hr.contract search New
hr_contract_view_tree hr.contract.list hr.contract list New
hr_departure_wizard_view_form hr.departure.wizard.view.form.extend hr.departure.wizard form Inherits hr.hr_departure_wizard_view_form
hr_employee_view_graph_inherit_hr_contract hr.employee.view.graph hr.employee graph Inherits hr.hr_employee_view_graph
hr_employee_view_pivot_inherit_hr_contract hr.employee.view.pivot hr.employee pivot Inherits hr.hr_employee_view_pivot
hr_employee_view_search hr.employee.view.search.inherit.contract hr.employee search Inherits hr.view_employee_filter
hr_employee_view_search hr.employee.view.search hr.employee search Inherits hr.view_employee_filter
hr_hr_employee_view_form2 hr.hr.employee.view.form2 hr.employee form Inherits hr.view_employee_form
hr_hr_employee_view_form3 hr.hr.employee.view.form3 hr.employee form Inherits hr.view_employee_form
hr_user_view_form hr.user.preferences.view.form.contract.inherit res.users form Inherits hr.res_users_view_form_profile
res_config_settings_view_form res.config.settings.view.form.inherit.hr.contract res.config.settings form Inherits hr.res_config_settings_view_form
resource_calendar_view_form resource.calendar.view.form.inherit.hr.contract resource.calendar form Inherits resource.resource_calendar_form
resource_calendar_view_tree resource.calendar.view.list.inherit.hr.contract resource.calendar list Inherits resource.view_resource_calendar_tree
view_employee_public_form hr.employee.public form Inherits hr.hr_employee_public_view_form
view_employee_tree hr.employee.list hr.employee list Inherits hr.view_employee_tree
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (15)

New fields (27)
  • active Boolean
    default=True
  • active_employee Boolean
    related='employee_id.active' string='Active Employee'
  • calendar_mismatch Boolean
    compute='_compute_calendar_mismatch' compute_sudo=True
  • 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_employee_contract' default=<expr> readonly=False required=True store=True args: 'res.company'
  • contract_type_id Many2one → hr.contract.type
    tracking=True args: 'hr.contract.type', 'Contract Type'
  • contract_wage Monetary
    compute='_compute_contract_wage' args: 'Contract Wage'
  • contracts_count Integer
    groups='hr_contract.group_hr_contract_employee_manager' related='employee_id.contracts_count'
  • country_code Char
    depends=['company_country_id'] readonly=True related='company_country_id.code'
  • currency_id Many2one
    readonly=True related='company_id.currency_id' string='Currency'
  • date_end Date
    help="End date of the contract (if it's a fixed-term contract)." tracking=True args: 'End Date'
  • date_start Date
    default=fields.Date.today index=True required=True tracking=True args: 'Start Date'
  • department_id Many2one → hr.department
    compute='_compute_employee_contract' domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" readonly=False store=True string='Department' args: 'hr.department'
  • employee_id Many2one → hr.employee
    domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" index=True string='Employee' tracking=True args: 'hr.employee'
  • first_contract_date Date
    related='employee_id.first_contract_date'
  • hr_responsible_id Many2one → res.users
    domain=_get_hr_responsible_domain help="Person responsible for validating the employee's contracts." tracking=True args: 'res.users', 'HR Responsible'
  • job_id Many2one → hr.job
    compute='_compute_employee_contract' domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" readonly=False store=True string='Job Position' args: 'hr.job'
  • kanban_state Selection
    copy=False default='normal' string='Kanban State' tracking=True args: [('normal', 'Ongoing'), ('done', 'Ready'), ('blocked', 'Warning')]
  • name Char
    required=True args: 'Contract Reference'
  • notes Html
    args: 'Notes'
  • permit_no Char
    readonly=False related='employee_id.permit_no' args: 'Work Permit No'
  • resource_calendar_id Many2one → resource.calendar
    compute='_compute_employee_contract' copy=False default=<expr> domain="['|', ('company_id', '=', False), ('company_id', '=', company_id)]" index=True readonly=False store=True tracking=True args: 'resource.calendar', 'Working Schedule'
  • state Selection
    copy=False default='draft' group_expand=True help='Status of the contract' string='Status' tracking=True args: [('draft', 'New'), ('open', 'Running'), ('close', 'Expired'), ('cancel', 'Cancelled')]
  • structure_type_id Many2one → hr.payroll.structure.type
    compute='_compute_structure_type_id' readonly=False store=True string='Salary Structure Type' tracking=True args: 'hr.payroll.structure.type'
  • trial_date_end Date
    help='End date of the trial period (if there is one).' args: 'End of Trial Period'
  • visa_no Char
    readonly=False related='employee_id.visa_no' args: 'Visa No'
  • wage Monetary
    aggregator='avg' help="Employee's monthly gross wage." required=True tracking=True args: 'Wage'
Public methods (6)
  • action_open_contract_form(self)
  • action_open_contract_history(self)
  • action_open_contract_list(self)
  • create(self, vals_list)
    @api.model_create_multi
  • update_state(self)
    @api.model
  • write(self, vals)

New fields (24)
  • active_employee Boolean
    readonly=True args: 'Active Employee'
  • activity_state Selection
    related='contract_id.activity_state'
  • company_country_id Many2one → res.country
    readonly=True related='company_id.country_id' string='Company country' args: 'res.country'
  • company_id Many2one → res.company
    readonly=True string='Company' args: 'res.company'
  • contract_count Integer
    compute='_compute_contract_count' string='# Contracts'
  • contract_id Many2one → hr.contract
    readonly=True args: 'hr.contract'
  • contract_ids One2many → hr.contract
    compute='_compute_contract_ids' compute_sudo=True readonly=True string='Contracts' args: 'hr.contract'
  • contract_type_id Many2one → hr.contract.type
    readonly=True args: 'hr.contract.type', 'Contract Type'
  • country_code Char
    depends=['company_country_id'] readonly=True related='company_country_id.code'
  • currency_id Many2one
    readonly=True related='company_id.currency_id' string='Currency'
  • date_end Date
    readonly=True args: 'End Date'
  • date_hired Date
    readonly=True args: 'Hire Date'
  • date_start Date
    readonly=True args: 'Start Date'
  • department_id Many2one → hr.department
    readonly=True string='Department' args: 'hr.department'
  • employee_id Many2one → hr.employee
    readonly=True string='Employee' args: 'hr.employee'
  • hr_responsible_id Many2one → res.users
    readonly=True string='HR Responsible' args: 'res.users'
  • is_under_contract Boolean
    readonly=True args: 'Is Currently Under Contract'
  • job_id Many2one → hr.job
    readonly=True string='Job Position' args: 'hr.job'
  • name Char
    readonly=True args: 'Contract Name'
  • resource_calendar_id Many2one → resource.calendar
    readonly=True string='Working Schedule' args: 'resource.calendar'
  • state Selection
    readonly=True string='Status' args: [('draft', 'New'), ('open', 'Running'), ('close', 'Expired'), ('cancel', 'Cancelled')]
  • structure_type_id Many2one → hr.payroll.structure.type
    readonly=True string='Salary Structure Type' args: 'hr.payroll.structure.type'
  • under_contract_state Selection
    compute='_compute_under_contract_state' string='Contractual Status' args: [('done', 'Under Contract'), ('blocked', 'Not Under Contract')]
  • wage Monetary
    aggregator='avg' help="Employee's monthly gross wage." readonly=True args: 'Wage'
Public methods (2)
  • hr_contract_view_form_new_action(self)
  • init(self)

New fields (1)
  • set_date_end Boolean
    default=<expr> help='Set the end date on the current contract.' string='Set Contract End Date'
Public methods (1)
  • action_register_departure(self)
    If set_date_end is checked, set the departure date as the end date to current running contract, and cancel all draft contracts

New fields (8)
  • calendar_mismatch Boolean
    groups='base.group_system,hr.group_hr_user' related='contract_id.calendar_mismatch'
  • contract_id Many2one → hr.contract
    copy=False domain="[('company_id', '=', company_id), ('employee_id', '=', id)]" groups='hr.group_hr_user' help='Current contract of the employee' string='Current Contract' args: 'hr.contract'
  • contract_ids One2many → hr.contract
    groups='hr.group_hr_user' string='Employee Contracts' args: 'hr.contract', 'employee_id'
  • contract_warning Boolean
    compute='_compute_contract_warning' groups='hr.group_hr_user' store=True string='Contract Warning'
  • contracts_count Integer
    compute='_compute_contracts_count' groups='hr.group_hr_user' string='Contract Count'
  • first_contract_date Date
    compute='_compute_first_contract_date' groups='hr.group_hr_user' store=True
  • legal_name Char
    compute='_compute_legal_name' groups='hr.group_hr_user' readonly=False store=True
  • vehicle Char
    groups='hr.group_hr_user' string='Company Vehicle'
Public methods (3)
  • action_open_contract(self)
  • filter_valid(self, checked_date)
  • write(self, vals)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (1)
  • first_contract_date Date
    compute='_compute_manager_only_fields' search='_search_first_contract_date'
Public methods (0)

No public methods.

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

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • contract_expiration_notice_period Integer
    default=7 args: 'Contract Expiry Notice Period'
  • work_permit_expiration_notice_period Integer
    default=60 args: 'Work Permit Expiry Notice Period'
Public methods (0)

No public methods.

New fields (2)
  • contract_expiration_notice_period Integer
    readonly=False related='company_id.contract_expiration_notice_period' string='Contract Expiry Notice Period'
  • work_permit_expiration_notice_period Integer
    readonly=False related='company_id.work_permit_expiration_notice_period' string='Work Permit Expiry Notice Period'
Public methods (0)

No public methods.

New fields (2)
  • bank_account_id Many2one
    related='employee_id.bank_account_id'
  • vehicle Char
    related='employee_id.vehicle'
Public methods (1)
  • SELF_READABLE_FIELDS(self)
    @property

New fields (1)
  • contracts_count Integer
    compute='_compute_contracts_count' groups='hr_contract.group_hr_contract_manager' args: '# Contracts using it'
Public methods (2)
  • action_open_contracts(self)
  • transfer_leaves_to(self, other_calendar, resources=None, from_date=None)
    Transfer some resource.calendar.leaves from 'self' to another calendar 'other_calendar'. Transfered leaves linked to `resources` (or all if `resources` is None) and starting after 'from_date' (or today if None).

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…