Employee Benefit

hr_employee_benefit
REPOSITORY
REPOSITORYOCA/hr
GIT
GIThttps://github.com/OCA/hr.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/hr/tree/10.0/hr_employee_benefit
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYGeneric Modules/Human Resources
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Savoir-faire Linux
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Savoir-faire Linux
COMMITTERS
COMMITTERSPedro M. Baeza, Stéphane Bidoul (ACSONE), Iryna Vushnevska
WEBSITE
WEBSITEhttps://www.savoirfairelinux.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr:
    - hr_salary_rule_reference
odoo/odoo:
    - hr_payroll
    - hr_contract
    - base_action_rule
    - base
    - resource
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
    - hr
    - hr_holidays
    - calendar
    - web_calendar
    - product
    - decimal_precision
    - report
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
hr_contract_view_form hr.contract.view.form hr.contract group Inherits hr_contract.hr_contract_view_form
hr_employee_benefit_category_form hr.employee.benefit.category.form hr.employee.benefit.category form New
hr_employee_benefit_category_list hr.employee.benefit.category.tree hr.employee.benefit.category tree New
hr_employee_benefit_rate_form hr.employee.benefit.rate.form hr.employee.benefit.rate form New
hr_employee_benefit_rate_list hr.employee.benefit.rate.tree hr.employee.benefit.rate tree New
hr_salary_rule_form hr.salary.rule.view.form hr.salary.rule page Inherits hr_payroll.hr_salary_rule_form
view_hr_employee_benefit_category_filter hr.employee.benefit.category.select hr.employee.benefit.category search New
view_hr_employee_benefit_rate_filter hr.employee.benefit.rate.select hr.employee.benefit.rate search New
view_hr_payslip_form hr.payslip.form hr.payslip field Inherits hr_payroll.view_hr_payslip_form
Models touched (8)

New fields (1)
  • benefit_line_ids One2many → hr.employee.benefit
    args: 'hr.employee.benefit', 'contract_id', 'Employee Benefits'
Public methods (0)

No public methods.

New fields (9)
  • amount_type Selection
    readonly=True related='rate_id.amount_type' string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    index=True ondelete='cascade' required=True args: 'hr.employee.benefit.category', 'Benefit'
  • code Char
    related='category_id.code' string='Code'
  • contract_id Many2one → hr.contract
    index=True ondelete='cascade' args: 'hr.contract', 'Contract'
  • date_end Date
    args: 'End Date'
  • date_start Date
    default=fields.Date.context_today required=True args: 'Start Date'
  • employee_amount Float
    readonly=True related='rate_id.employee_amount' string='Employee Amount'
  • employer_amount Float
    readonly=True related='rate_id.employer_amount' string='Employer Amount'
  • rate_id Many2one → hr.employee.benefit.rate
    required=True args: 'hr.employee.benefit.rate', 'Rate'
Public methods (1)
  • compute_amounts(self, payslip)
    @api.one

New fields (7)
  • active Boolean
    default=True args: 'active'
  • code Char
    help='The code that can be used in the salary rules to identify the benefit' args: 'Code'
  • description Text
    help='Brief explanation of which benefits the category contains.' args: 'Description'
  • name Char
    required=True args: 'Benefit Name'
  • rate_ids One2many → hr.employee.benefit.rate
    string='Benefit Rates' args: 'hr.employee.benefit.rate', 'category_id'
  • reference Char
    help='Field used to enter an external identifier for a benefit category. Example, pension plans may have a registration number.' args: 'Reference'
  • salary_rule_ids Many2many → hr.salary.rule
    args: 'hr.salary.rule', 'salary_rule_employee_benefit_rel', 'benefit_id', 'salary_rule_id', 'Salary Rules'
Public methods (0)

No public methods.

New fields (6)
  • amount_type Selection
    default='each_pay' required=True string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    required=True args: 'hr.employee.benefit.category', 'Benefit Category'
  • employee_amount Float
    compute='_get_amounts_now' readonly=True string='Employee Contribution'
  • employer_amount Float
    compute='_get_amounts_now' readonly=True string='Employer Contribution'
  • line_ids One2many → hr.employee.benefit.rate.line
    args: 'hr.employee.benefit.rate.line', 'parent_id', 'Rates'
  • name Char
    required=True args: 'Name'
Public methods (3)
  • compute_amounts(self, payslip)
    @api.multi
    Compute benefit lines
  • get_all_amount_types(self)
    @api.model
    Get the list of amount types for employee benefits This method is not called directly so that it can be inherited easily in other modules. When inheriting this method, the list of selections is updated in every related models.
  • get_amount(self, date, employer=False)
    @api.multi

New fields (7)
  • amount_type Selection
    readonly=True related='parent_id.amount_type' string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    readonly=True related='parent_id.category_id' string='Category' args: 'hr.employee.benefit.category'
  • date_end Date
    args: 'End Date'
  • date_start Date
    default=fields.Date.context_today required=True args: 'Start Date'
  • employee_amount Float
    digits_compute=dp.get_precision('Payroll') required=True args: 'Employee Amount'
  • employer_amount Float
    digits_compute=dp.get_precision('Payroll') required=True args: 'Employer Amount'
  • parent_id Many2one → hr.employee.benefit.rate
    ondelete='cascade' required=True args: 'hr.employee.benefit.rate', 'Parent'
Public methods (0)

No public methods.

New fields (2)
  • benefit_line_ids One2many → hr.payslip.benefit.line
    readonly=True states={'draft': [('readonly', False)]} args: 'hr.payslip.benefit.line', 'payslip_id', 'Employee Benefits'
  • pays_per_year Integer
    compute='_get_pays_per_year' help='Field required to compute benefits based on an annual amount.' readonly=True store=True string='Number of pays per year'
Public methods (2)
  • button_compute_benefits(self)
    @api.multi
  • compute_benefits(self)
    @api.one
    Compute the employee benefits on the payslip. This method can be called from inside a salary rule. Exemple ------- payslip.compute_benefits() This is required when the benefits are based on the value of one or more salary rules. The module hr_employee_benefit_percent implements that functionnality.

New fields (6)
  • category_id Many2one → hr.employee.benefit.category
    required=True args: 'hr.employee.benefit.category', 'Benefit'
  • employee_amount Float
    digits_compute=dp.get_precision('Payroll') args: 'Employee Contribution'
  • employer_amount Float
    digits_compute=dp.get_precision('Payroll') args: 'Employer Contribution'
  • payslip_id Many2one → hr.payslip
    ondelete='cascade' required=True args: 'hr.payslip', 'Payslip'
  • reference Char
    args: 'Reference'
  • source Selection
    default='manual' readonly=True required=True string='Type' type='char' args: [('contract', 'From Contract'), ('manual', 'Added Manually')]
Public methods (0)

No public methods.

New fields (1)
  • employee_benefit_ids Many2many → hr.employee.benefit.category
    args: 'hr.employee.benefit.category', 'salary_rule_employee_benefit_rel', 'salary_rule_id', 'benefit_id', 'Salary Rules'
Public methods (1)
  • sum_benefits(self, payslip, **kwargs)
    @api.multi
    Method used to sum the employee benefits computed on the payslip Because there are many possible parameters and that the module needs to be inherited easily, arguments are passed through kwargs :param codes: The type of benefit over which to sum :type codes: list of string or single string :param employer: If True, sum over the employer contribution. If False, sum over the employee contribution Exemple ------- payslip.compute_benefits(payslip, employer=True) Will return the employer contribution for the pay period
REPOSITORY
REPOSITORYOCA/hr
GIT
GIThttps://github.com/OCA/hr.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/hr/tree/9.0/hr_employee_benefit
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYGeneric Modules/Human Resources
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Savoir-faire Linux
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Savoir-faire Linux
COMMITTERS
COMMITTERSPedro M. Baeza, Stéphane Bidoul (ACSONE)
WEBSITE
WEBSITEhttps://www.savoirfairelinux.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:21
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr:
    - hr_salary_rule_reference
odoo/odoo:
    - hr_payroll
    - hr
    - base_setup
    - base
    - web_kanban
    - web
    - mail
    - bus
    - resource
    - web_tip
    - hr_contract
    - base_action_rule
    - hr_holidays
    - calendar
    - web_calendar
    - report
    - decimal_precision
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
hr_contract_view_form hr.contract.view.form hr.contract group Inherits hr_contract.hr_contract_view_form
hr_employee_benefit_category_form hr.employee.benefit.category.form hr.employee.benefit.category form New
hr_employee_benefit_category_list hr.employee.benefit.category.tree hr.employee.benefit.category tree New
hr_employee_benefit_rate_form hr.employee.benefit.rate.form hr.employee.benefit.rate form New
hr_employee_benefit_rate_list hr.employee.benefit.rate.tree hr.employee.benefit.rate tree New
hr_salary_rule_form hr.salary.rule.view.form hr.salary.rule page Inherits hr_payroll.hr_salary_rule_form
view_hr_employee_benefit_category_filter hr.employee.benefit.category.select hr.employee.benefit.category search New
view_hr_employee_benefit_rate_filter hr.employee.benefit.rate.select hr.employee.benefit.rate search New
view_hr_payslip_form hr.payslip.form hr.payslip field Inherits hr_payroll.view_hr_payslip_form
Models touched (8)

New fields (1)
  • benefit_line_ids One2many → hr.employee.benefit
    args: 'hr.employee.benefit', 'contract_id', 'Employee Benefits'
Public methods (0)

No public methods.

New fields (9)
  • amount_type Selection
    readonly=True related='rate_id.amount_type' string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    index=True ondelete='cascade' required=True args: 'hr.employee.benefit.category', 'Benefit'
  • code Char
    related='category_id.code' string='Code'
  • contract_id Many2one → hr.contract
    index=True ondelete='cascade' args: 'hr.contract', 'Contract'
  • date_end Date
    args: 'End Date'
  • date_start Date
    default=fields.Date.context_today required=True args: 'Start Date'
  • employee_amount Float
    readonly=True related='rate_id.employee_amount' string='Employee Amount'
  • employer_amount Float
    readonly=True related='rate_id.employer_amount' string='Employer Amount'
  • rate_id Many2one → hr.employee.benefit.rate
    required=True args: 'hr.employee.benefit.rate', 'Rate'
Public methods (1)
  • compute_amounts(self, payslip)
    @api.one

New fields (7)
  • active Boolean
    default=True args: 'active'
  • code Char
    help='The code that can be used in the salary rules to identify the benefit' args: 'Code'
  • description Text
    help='Brief explanation of which benefits the category contains.' args: 'Description'
  • name Char
    required=True args: 'Benefit Name'
  • rate_ids One2many → hr.employee.benefit.rate
    string='Benefit Rates' args: 'hr.employee.benefit.rate', 'category_id'
  • reference Char
    help='Field used to enter an external identifier for a benefit category. Example, pension plans may have a registration number.' args: 'Reference'
  • salary_rule_ids Many2many → hr.salary.rule
    args: 'hr.salary.rule', 'salary_rule_employee_benefit_rel', 'benefit_id', 'salary_rule_id', 'Salary Rules'
Public methods (0)

No public methods.

New fields (6)
  • amount_type Selection
    default='each_pay' required=True string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    required=True args: 'hr.employee.benefit.category', 'Benefit Category'
  • employee_amount Float
    compute='_get_amounts_now' readonly=True string='Employee Contribution'
  • employer_amount Float
    compute='_get_amounts_now' readonly=True string='Employer Contribution'
  • line_ids One2many → hr.employee.benefit.rate.line
    args: 'hr.employee.benefit.rate.line', 'parent_id', 'Rates'
  • name Char
    required=True args: 'Name'
Public methods (3)
  • compute_amounts(self, payslip)
    @api.multi
    Compute benefit lines
  • get_all_amount_types(self)
    @api.model
    Get the list of amount types for employee benefits This method is not called directly so that it can be inherited easily in other modules. When inheriting this method, the list of selections is updated in every related models.
  • get_amount(self, date, employer=False)
    @api.multi

New fields (7)
  • amount_type Selection
    readonly=True related='parent_id.amount_type' string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    readonly=True related='parent_id.category_id' string='Category' args: 'hr.employee.benefit.category'
  • date_end Date
    args: 'End Date'
  • date_start Date
    default=fields.Date.context_today required=True args: 'Start Date'
  • employee_amount Float
    digits_compute=dp.get_precision('Payroll') required=True args: 'Employee Amount'
  • employer_amount Float
    digits_compute=dp.get_precision('Payroll') required=True args: 'Employer Amount'
  • parent_id Many2one → hr.employee.benefit.rate
    ondelete='cascade' required=True args: 'hr.employee.benefit.rate', 'Parent'
Public methods (0)

No public methods.

New fields (2)
  • benefit_line_ids One2many → hr.payslip.benefit.line
    readonly=True states={'draft': [('readonly', False)]} args: 'hr.payslip.benefit.line', 'payslip_id', 'Employee Benefits'
  • pays_per_year Integer
    compute='_get_pays_per_year' help='Field required to compute benefits based on an annual amount.' readonly=True store=True string='Number of pays per year'
Public methods (2)
  • button_compute_benefits(self)
    @api.multi
  • compute_benefits(self)
    @api.one
    Compute the employee benefits on the payslip. This method can be called from inside a salary rule. Exemple ------- payslip.compute_benefits() This is required when the benefits are based on the value of one or more salary rules. The module hr_employee_benefit_percent implements that functionnality.

New fields (6)
  • category_id Many2one → hr.employee.benefit.category
    required=True args: 'hr.employee.benefit.category', 'Benefit'
  • employee_amount Float
    digits_compute=dp.get_precision('Payroll') args: 'Employee Contribution'
  • employer_amount Float
    digits_compute=dp.get_precision('Payroll') args: 'Employer Contribution'
  • payslip_id Many2one → hr.payslip
    ondelete='cascade' required=True args: 'hr.payslip', 'Payslip'
  • reference Char
    args: 'Reference'
  • source Selection
    default='manual' readonly=True required=True string='Type' type='char' args: [('contract', 'From Contract'), ('manual', 'Added Manually')]
Public methods (0)

No public methods.

New fields (1)
  • employee_benefit_ids Many2many → hr.employee.benefit.category
    args: 'hr.employee.benefit.category', 'salary_rule_employee_benefit_rel', 'salary_rule_id', 'benefit_id', 'Salary Rules'
Public methods (1)
  • sum_benefits(self, payslip, **kwargs)
    @api.multi
    Method used to sum the employee benefits computed on the payslip Because there are many possible parameters and that the module needs to be inherited easily, arguments are passed through kwargs :param codes: The type of benefit over which to sum :type codes: list of string or single string :param employer: If True, sum over the employer contribution. If False, sum over the employee contribution Exemple ------- payslip.compute_benefits(payslip, employer=True) Will return the employer contribution for the pay period
REPOSITORY
REPOSITORYOCA/hr
GIT
GIThttps://github.com/OCA/hr.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/hr/tree/8.0/hr_employee_benefit
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYGeneric Modules/Human Resources
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Savoir-faire Linux
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Savoir-faire Linux
COMMITTERS
COMMITTERSStéphane Bidoul, GitHub, Stéphane Bidoul (ACSONE), OCA Transbot, dufresnedavid, oca-travis, Weblate
WEBSITE
WEBSITEhttps://www.savoirfairelinux.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:23
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr:
    - hr_salary_rule_reference
odoo/odoo:
    - hr_payroll
    - hr
    - base_setup
    - base
    - web_kanban
    - web
    - mail
    - resource
    - board
    - hr_contract
    - base_action_rule
    - hr_holidays
    - calendar
    - web_calendar
    - decimal_precision
    - report
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
hr_contract_view_form hr.contract.view.form hr.contract group Inherits hr_contract.hr_contract_view_form
hr_employee_benefit_category_form hr.employee.benefit.category.form hr.employee.benefit.category form New
hr_employee_benefit_category_list hr.employee.benefit.category.tree hr.employee.benefit.category tree New
hr_employee_benefit_rate_form hr.employee.benefit.rate.form hr.employee.benefit.rate form New
hr_employee_benefit_rate_list hr.employee.benefit.rate.tree hr.employee.benefit.rate tree New
hr_salary_rule_form hr.salary.rule.view.form hr.salary.rule page Inherits hr_payroll.hr_salary_rule_form
view_hr_employee_benefit_category_filter hr.employee.benefit.category.select hr.employee.benefit.category search New
view_hr_employee_benefit_rate_filter hr.employee.benefit.rate.select hr.employee.benefit.rate search New
view_hr_payslip_form hr.payslip.form hr.payslip field Inherits hr_payroll.view_hr_payslip_form
Models touched (8)

New fields (1)
  • benefit_line_ids One2many → hr.employee.benefit
    args: 'hr.employee.benefit', 'contract_id', 'Employee Benefits'
Public methods (0)

No public methods.

New fields (9)
  • amount_type Selection
    readonly=True related='rate_id.amount_type' string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    index=True ondelete='cascade' required=True args: 'hr.employee.benefit.category', 'Benefit'
  • code Char
    related='category_id.code' string='Code'
  • contract_id Many2one → hr.contract
    index=True ondelete='cascade' args: 'hr.contract', 'Contract'
  • date_end Date
    args: 'End Date'
  • date_start Date
    default=fields.Date.context_today required=True args: 'Start Date'
  • employee_amount Float
    readonly=True related='rate_id.employee_amount' string='Employee Amount'
  • employer_amount Float
    readonly=True related='rate_id.employer_amount' string='Employer Amount'
  • rate_id Many2one → hr.employee.benefit.rate
    required=True args: 'hr.employee.benefit.rate', 'Rate'
Public methods (1)
  • compute_amounts(self, payslip)
    @api.one

New fields (7)
  • active Boolean
    default=True args: 'active'
  • code Char
    help='The code that can be used in the salary rules to identify the benefit' args: 'Code'
  • description Text
    help='Brief explanation of which benefits the category contains.' args: 'Description'
  • name Char
    required=True args: 'Benefit Name'
  • rate_ids One2many → hr.employee.benefit.rate
    string='Benefit Rates' args: 'hr.employee.benefit.rate', 'category_id'
  • reference Char
    help='Field used to enter an external identifier for a benefit category. Example, pension plans may have a registration number.' args: 'Reference'
  • salary_rule_ids Many2many → hr.salary.rule
    args: 'hr.salary.rule', 'salary_rule_employee_benefit_rel', 'benefit_id', 'salary_rule_id', 'Salary Rules'
Public methods (0)

No public methods.

New fields (6)
  • amount_type Selection
    default='each_pay' required=True string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    required=True args: 'hr.employee.benefit.category', 'Benefit Category'
  • employee_amount Float
    compute='_get_amounts_now' readonly=True string='Employee Contribution'
  • employer_amount Float
    compute='_get_amounts_now' readonly=True string='Employer Contribution'
  • line_ids One2many → hr.employee.benefit.rate.line
    args: 'hr.employee.benefit.rate.line', 'parent_id', 'Rates'
  • name Char
    required=True args: 'Name'
Public methods (3)
  • compute_amounts(self, payslip)
    @api.multi
    Compute benefit lines
  • get_all_amount_types(self)
    @api.model
    Get the list of amount types for employee benefits This method is not called directly so that it can be inherited easily in other modules. When inheriting this method, the list of selections is updated in every related models.
  • get_amount(self, date, employer=False)
    @api.multi

New fields (7)
  • amount_type Selection
    readonly=True related='parent_id.amount_type' string='Amount Type' args: get_amount_types
  • category_id Many2one → hr.employee.benefit.category
    readonly=True related='parent_id.category_id' string='Category' args: 'hr.employee.benefit.category'
  • date_end Date
    args: 'End Date'
  • date_start Date
    default=fields.Date.context_today required=True args: 'Start Date'
  • employee_amount Float
    digits_compute=dp.get_precision('Payroll') required=True args: 'Employee Amount'
  • employer_amount Float
    digits_compute=dp.get_precision('Payroll') required=True args: 'Employer Amount'
  • parent_id Many2one → hr.employee.benefit.rate
    ondelete='cascade' required=True args: 'hr.employee.benefit.rate', 'Parent'
Public methods (0)

No public methods.

New fields (2)
  • benefit_line_ids One2many → hr.payslip.benefit.line
    readonly=True states={'draft': [('readonly', False)]} args: 'hr.payslip.benefit.line', 'payslip_id', 'Employee Benefits'
  • pays_per_year Integer
    compute='_get_pays_per_year' help='Field required to compute benefits based on an annual amount.' readonly=True store=True string='Number of pays per year'
Public methods (2)
  • button_compute_benefits(self)
    @api.multi
  • compute_benefits(self)
    @api.one
    Compute the employee benefits on the payslip. This method can be called from inside a salary rule. Exemple ------- payslip.compute_benefits() This is required when the benefits are based on the value of one or more salary rules. The module hr_employee_benefit_percent implements that functionnality.

New fields (6)
  • category_id Many2one → hr.employee.benefit.category
    required=True args: 'hr.employee.benefit.category', 'Benefit'
  • employee_amount Float
    digits_compute=dp.get_precision('Payroll') args: 'Employee Contribution'
  • employer_amount Float
    digits_compute=dp.get_precision('Payroll') args: 'Employer Contribution'
  • payslip_id Many2one → hr.payslip
    ondelete='cascade' required=True args: 'hr.payslip', 'Payslip'
  • reference Char
    args: 'Reference'
  • source Selection
    default='manual' readonly=True required=True string='Type' type='char' args: [('contract', 'From Contract'), ('manual', 'Added Manually')]
Public methods (0)

No public methods.

New fields (1)
  • employee_benefit_ids Many2many → hr.employee.benefit.category
    args: 'hr.employee.benefit.category', 'salary_rule_employee_benefit_rel', 'salary_rule_id', 'benefit_id', 'Salary Rules'
Public methods (1)
  • sum_benefits(self, payslip, **kwargs)
    @api.multi
    Method used to sum the employee benefits computed on the payslip Because there are many possible parameters and that the module needs to be inherited easily, arguments are passed through kwargs :param codes: The type of benefit over which to sum :type codes: list of string or single string :param employer: If True, sum over the employer contribution. If False, sum over the employee contribution Exemple ------- payslip.compute_benefits(payslip, employer=True) Will return the employer contribution for the pay period
REPOSITORY
REPOSITORYOCA/hr
GIT
GIThttps://github.com/OCA/hr.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/hr/tree/7.0/hr_employee_benefit
VERSION
VERSION 1.0
CATEGORY
CATEGORYGeneric Modules/Human Resources
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Savoir-faire Linux
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Savoir-faire Linux
COMMITTERS
COMMITTERSOCA Transbot, dufresnedavid
WEBSITE
WEBSITEhttps://www.savoirfairelinux.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:14
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/hr:
    - hr_salary_rule_reference
odoo/odoo:
    - hr_payroll
    - hr
    - base_setup
    - base
    - web_kanban
    - web
    - mail
    - resource
    - process
    - board
    - hr_contract
    - hr_holidays
    - base_calendar
    - base_status
    - base_action_rule
    - decimal_precision
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Employee Benefit
================
This module implements employee benefits in order to produce payslips.

Employee benefits can be computed automatically at a specific point in a
payroll structure. They can also be computed using the button on the
payslip form, in the 'Employee Benefits' tab.

Also, they can be added manually on a payslip.

If a benefit has 2 different rates in the same payslip period,
the 2 rates will be weighted by the fraction of the payslip over which they
apply.
    

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
hr_contract_view_form hr.contract.view.form hr.contract group Inherits hr_contract.hr_contract_view_form
hr_employee_benefit_category_form hr.employee.benefit.category.form hr.employee.benefit.category form New
hr_employee_benefit_category_list hr.employee.benefit.category.tree hr.employee.benefit.category tree New
hr_employee_benefit_rate_form hr.employee.benefit.rate.form hr.employee.benefit.rate form New
hr_employee_benefit_rate_list hr.employee.benefit.rate.tree hr.employee.benefit.rate tree New
hr_salary_rule_form hr.salary.rule.view.form hr.salary.rule page Inherits hr_payroll.hr_salary_rule_form
view_hr_employee_benefit_category_filter hr.employee.benefit.category.select hr.employee.benefit.category search New
view_hr_employee_benefit_rate_filter hr.employee.benefit.rate.select hr.employee.benefit.rate search New
view_hr_payslip_form hr.payslip.form hr.payslip field Inherits hr_payroll.view_hr_payslip_form
Models touched (8)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • compute_amounts(self, cr, uid, ids, payslip, context=None)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (3)
  • compute_amounts(self, cr, uid, ids, payslip, context=None)
    Compute benefit lines
  • get_all_amount_types(self, cr, uid, context=None)
    Get the list of amount types for employee benefits This method is not called directly so that it can be inherited easily in other modules. When inheriting this method, the list of selections is updated in every related models.
  • get_amount(self, cr, uid, ids, date, employer=False, context=None)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (2)
  • button_compute_benefits(self, cr, uid, ids, context=None)
  • compute_benefits(self, cr, uid, ids, context=None)
    Compute the employee benefits on the payslip. This method can be called from inside a salary rule. Exemple ------- payslip.compute_benefits() This is required when the benefits are based on the value of one or more salary rules. The module hr_employee_benefit_percent implements that functionnality.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • sum_benefits(self, cr, uid, ids, payslip, context=None, **kwargs)
    Method used to sum the employee benefits computed on the payslip Because there are many possible parameters and that the module needs to be inherited easily, arguments are passed through kwargs :param codes: The type of benefit over which to sum :type codes: list of string or single string Benefit Codes should be used in very specific cases Example, you may have a salary rule on which you need to sum the employee contribution for a category of benefit the employer contribution for another category :param employer: If True, sum over the employer contribution. If False, sum over the employee contribution :type annual: boolean Exemple ------- payslip.compute_benefits(payslip, employer=True) Will return the employer contribution for the pay period