| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/payroll |
| GIT | |
| GIT | https://github.com/OCA/payroll.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/payroll/tree/19.0/payroll |
| VERSION | |
| VERSION | 1.0.0 |
| CATEGORY | |
| CATEGORY | Payroll |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | Yes |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Odoo SA |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Odoo SA |
| COMMITTERS | |
| COMMITTERS | Weblate, OCA-git-bot, oca-ci, Milan Topuzov, tishmen |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/payroll |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 19:40:49 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - hr_holidays - hr - base_setup - base - web - digest - bus - web_tour - html_editor - portal - http_routing - auth_signup - resource - phone_validation - resource_mail - calendar |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | Manage your employee payroll records. This module is a backport from Odoo SA and as such, it is not included in the OCA CLA. That means we do not have a copy of the copyright on it like all other OCA modules. |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_contract_view_form |
hr.version.view.form.payroll | hr.version | xpath | Inherits hr.hr_contract_template_form_view |
hr_contribution_register_view_form |
hr.contribution.register.form | hr.contribution.register | form | New |
hr_contribution_register_view_kanban |
hr.contribution.register.kanban | hr.contribution.register | kanban | New |
hr_contribution_register_view_search |
hr.contribution.register.search | hr.contribution.register | search | New |
hr_contribution_register_view_tree |
hr.contribution.register.list | hr.contribution.register | list | New |
hr_employee_view_form |
hr.employee.view.form.payroll | hr.employee | xpath | Inherits hr.view_employee_form |
hr_payroll_structure_view_form |
hr.payroll.structure.form | hr.payroll.structure | form | New |
hr_payroll_structure_view_kanban |
hr.payroll.structure.kanban | hr.payroll.structure | kanban | New |
hr_payroll_structure_view_search |
hr.payroll.structure.select | hr.payroll.structure | search | New |
hr_payroll_structure_view_tree |
hr.payroll.structure.list | hr.payroll.structure | list | New |
hr_payroll_structure_view_tree_children |
hr.payroll.structure.list | hr.payroll.structure | list | New |
hr_payslip_change_state_form |
hr.payslip.change.state.form | hr.payslip.change.state | form | New |
hr_payslip_line_view_form |
hr.payslip.line.form | hr.payslip.line | form | New |
hr_payslip_line_view_pivot |
hr.payslip.line.pivot | hr.payslip.line | pivot | New |
hr_payslip_line_view_search |
hr.payslip.line.select | hr.payslip.line | search | New |
hr_payslip_line_view_tree |
hr.payslip.line.list | hr.payslip.line | list | New |
hr_payslip_run_view_form |
hr.payslip.run.form | hr.payslip.run | form | New |
hr_payslip_run_view_kanban |
hr.payslip.run.kanban | hr.payslip.run | kanban | New |
hr_payslip_run_view_search |
hr.payslip.run.search | hr.payslip.run | search | New |
hr_payslip_run_view_tree |
hr.payslip.run.list | hr.payslip.run | list | New |
hr_payslip_view_form |
hr.payslip.form | hr.payslip | form | New |
hr_payslip_view_kanban |
hr.payslip.kanban | hr.payslip | kanban | New |
hr_payslip_view_search |
hr.payslip.select | hr.payslip | search | New |
hr_payslip_view_tree |
hr.payslip.list | hr.payslip | list | New |
hr_salary_rule_category_view_form |
hr.salary.rule.category.form | hr.salary.rule.category | form | New |
hr_salary_rule_category_view_search |
hr.salary.rule.category.select | hr.salary.rule.category | search | New |
hr_salary_rule_category_view_tree |
hr.salary.rule.category.list | hr.salary.rule.category | list | New |
hr_salary_rule_view_form |
hr.salary.rule.form | hr.salary.rule | form | New |
hr_salary_rule_view_kanban |
hr.salary.rule.kanban | hr.salary.rule | kanban | New |
hr_salary_rule_view_search |
hr.salary.rule.select | hr.salary.rule | search | New |
hr_salary_rule_view_tree |
hr.salary.rule.list | hr.salary.rule | list | New |
hr_salary_rule_view_tree_children |
hr.salary.rule.list | hr.salary.rule | list | New |
report_contributionregister |
report_contributionregister | ir.ui.view | qweb | New |
report_payslip |
report_payslip | ir.ui.view | qweb | New |
report_payslipdetails |
report_payslipdetails | ir.ui.view | qweb | New |
res_config_settings_view_form |
res.config.settings.view.form.inherit.hr.payroll | res.config.settings | xpath | Inherits base.res_config_settings_view_form |
view_hr_payslip_by_employees |
payroll_payslip_employees | hr.payslip.employees | form | New |
view_payslip_lines_contribution_register |
payslip.lines.contribution.register | payslip.lines.contribution.register | form | New |
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
partner_id
Many2one → res.partner
string='Partner'
args: 'res.partner'
register_line_ids
One2many → hr.payslip.line
readonly=True
string='Register Line'
args: 'hr.payslip.line', 'register_id'
No public methods.
payslip_count
Integer
compute='_compute_payslip_count'
groups='payroll.group_payroll_user'
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'employee_id'
No public methods.
children_ids
One2many → hr.payroll.structure
copy=True
string='Children'
args: 'hr.payroll.structure', 'parent_id'
code
Char
string='Reference'
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
parent_id
Many2one → hr.payroll.structure
default=<expr>
string='Parent'
args: 'hr.payroll.structure'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
rule_ids
Many2many → hr.salary.rule
string='Salary Rules'
args: 'hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id'
copy(self, default=None)
get_all_rules(self)
get_structure_with_parents(self)
allow_cancel_payslips
Boolean
compute='_compute_allow_cancel_payslips'
args: 'Allow Canceling Payslips'
company_id
Many2one → res.company
copy=False
default=<expr>
readonly=True
string='Company'
args: 'res.company'
compute_date
Date
contract_id
Many2one → hr.version
readonly=True
string='Contract'
tracking=True
args: 'hr.version'
credit_note
Boolean
help='Indicates this payslip has a refund of another'
readonly=True
date_from
Date
default=<expr>
readonly=True
required=True
tracking=True
date_to
Date
default=<expr>
readonly=True
required=True
tracking=True
dynamic_filtered_payslip_lines
One2many → hr.payslip.line
compute='_compute_dynamic_filtered_payslip_lines'
args: 'hr.payslip.line'
employee_id
Many2one → hr.employee
readonly=True
required=True
string='Employee'
args: 'hr.employee'
hide_child_lines
Boolean
default=False
hide_invisible_lines
Boolean
default=False
string='Show only lines that appear on payslip'
input_line_ids
One2many → hr.payslip.input
readonly=True
string='Payslip Inputs'
args: 'hr.payslip.input', 'payslip_id'
line_ids
One2many → hr.payslip.line
readonly=True
string='Payslip Lines'
args: 'hr.payslip.line', 'slip_id'
name
Char
string='Payslip Name'
note
Text
readonly=True
string='Internal Note'
tracking=True
number
Char
copy=False
readonly=True
string='Reference'
paid
Boolean
copy=False
readonly=True
string='Made Payment Order ? '
payslip_count
Integer
compute='_compute_payslip_count'
string='Payslip Computation Details'
payslip_run_id
Many2one → hr.payslip.run
copy=False
readonly=True
string='Payslip Batches'
tracking=True
args: 'hr.payslip.run'
prevent_compute_on_confirm
Boolean
compute='_compute_prevent_compute_on_confirm'
args: 'Prevent Compute on Confirm'
refunded_id
Many2one → hr.payslip
readonly=True
string='Refunded Payslip'
args: 'hr.payslip'
state
Selection
copy=False
default='draft'
help="* When the payslip is created the status is 'Draft'\n \n* If the payslip is under verification, the status is 'Waiting'.\n \n* If the payslip is confirmed then status is set to 'Done'.\n \n* When user cancel payslip the status is 'Rejected'."
index=True
readonly=True
string='Status'
tracking=True
args: [('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
string='Structure'
args: 'hr.payroll.structure'
worked_days_line_ids
One2many → hr.payslip.worked_days
copy=True
readonly=True
string='Payslip Worked Days'
args: 'hr.payslip.worked_days', 'payslip_id'
action_payslip_cancel(self)
action_payslip_done(self)
action_payslip_draft(self)
compute_sheet(self)
copy(self, default=None)
get_current_contract_dict(self, contract, contracts)
get_inputs(self, contracts, date_from, date_to)
get_lines_dict(self)
get_payroll_dict(self, contracts)
get_payslip_vals(self, date_from, date_to, employee_id=False, contract_id=False, struct_id=False)
get_salary_line_total(self, code)
get_worked_day_lines(self, contracts, date_from, date_to)
localdict_hook(self, localdict)
onchange_contract(self)
onchange_dates(self)
onchange_employee(self)
onchange_struct_id(self)
refund_sheet(self)
state
Selection
help="* When the payslip is created the status is 'Draft'. \n* If the payslip is under verification, the status is 'Compute Sheet'. \n* If the payslip is confirmed then status is set to 'Done'. \n* When user cancel payslip the status is 'Rejected'."
selection=[('draft', 'Set to Draft'), ('verify', 'Compute Sheet'), ('done', 'Confirm'), ('cancel', 'Cancel Payslip')]
string='Action'
change_state_confirm(self)
employee_ids
Many2many → hr.employee
compute_sheet(self)
amount
Float
help='It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01.'
amount_qty
Float
help='It can be used in computation for other inputs'
args: 'Amount Quantity'
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.version
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.version'
name
Char
required=True
string='Description'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
allow_edit_payslip_lines
Boolean
compute='_compute_allow_edit_payslip_lines'
args: 'Allow editing'
amount
Float
digits='Payroll'
child_ids
One2many → hr.payslip.line
string='Child Payslip Lines'
args: 'hr.payslip.line', 'parent_line_id'
contract_id
Many2one → hr.version
index=True
required=True
string='Contract'
args: 'hr.version'
date_from
Date
related='slip_id.date_from'
store=True
args: 'Date From'
employee_id
Many2one → hr.employee
required=True
string='Employee'
args: 'hr.employee'
parent_line_id
Many2one → hr.payslip.line
compute='_compute_parent_line_id'
store=True
string='Parent Payslip Line'
args: 'hr.payslip.line'
payslip_run_id
Many2one → hr.payslip.run
related='slip_id.payslip_run_id'
string='Payslip Batch'
args: 'hr.payslip.run'
quantity
Float
default=1.0
digits='Payroll'
rate
Float
default=100.0
digits='Payroll Rate'
string='Rate (%)'
salary_rule_id
Many2one → hr.salary.rule
required=True
string='Rule'
args: 'hr.salary.rule'
slip_id
Many2one → hr.payslip
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
total
Float
compute='_compute_total'
digits='Payroll'
store=True
create(self, vals_list)
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
credit_note
Boolean
help='If its checked, indicates that all payslips generated from here are refund payslips.'
readonly=True
date_end
Date
default=<expr>
readonly=True
required=True
string='Date To'
date_start
Date
default=<expr>
readonly=True
required=True
string='Date From'
name
Char
readonly=True
required=True
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'payslip_run_id'
state
Selection
copy=False
default='draft'
index=True
readonly=True
string='Status'
tracking=1
args: [('draft', 'Draft'), ('close', 'Close')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip batch, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
string='Structure'
args: 'hr.payroll.structure'
close_payslip_run(self)
draft_payslip_run(self)
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.version
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.version'
name
Char
required=True
string='Description'
number_of_days
Float
string='Number of Days'
number_of_hours
Float
string='Number of Hours'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
code
Char
help='The code that can be used in the salary rules'
required=True
input_id
Many2one → hr.salary.rule
required=True
string='Salary Rule Input'
args: 'hr.salary.rule'
name
Char
required=True
string='Description'
No public methods.
active
Boolean
default=True
help='If the active field is set to false, it will allow you to hide the salary rule without removing it.'
amount_fix
Float
digits='Payroll'
string='Fixed Amount'
amount_percentage
Float
digits='Payroll Rate'
help='For example, enter 50.0 to apply a percentage of 50%'
string='Percentage (%)'
amount_percentage_base
Char
help='result will be affected to a variable'
string='Percentage based on'
amount_python_compute
Text
default='# Available variables:\n#-------------------------------\n# payslip: hr.payslip object\n# payslips: object containing payslips (browsable)\n# employee: hr.employee object\n# contract: hr.contract object\n# rules: object containing the rules code (previously computed)\n# categories: object containing the computed salary rule categories\n# (sum of amount of all rules belonging to that category).\n# worked_days: object containing the computed worked days.\n# inputs: object containing the computed inputs.\n# payroll: object containing miscellaneous values related to payroll\n# current_contract: object with values calculated from the current contract\n# result_rules: object with a dict of qty, rate, amount an total of calculated rules\n# tools: object that contain libraries and tools that can be used in calculations\n\n# Available compute variables:\n#-------------------------------\n# result: returned value have to be set in the variable \'result\'\n# result_rate: the rate that will be applied to "result".\n# result_qty: the quantity of units that will be multiplied to "result".\n# result_name: if this variable is computed, it will contain the name of the line.\n\n# Example:\n#-------------------------------\n# result = contract.wage * 0.10'
string='Python Code'
amount_select
Selection
default='fix'
help='The computation method for the rule amount.'
index=True
required=True
string='Amount Type'
args: [('percentage', 'Percentage (%)'), ('fix', 'Fixed Amount'), ('code', 'Python Code')]
appears_on_payslip
Boolean
default=True
help='Used to display the salary rule on payslip.'
string='Appears on Payslip'
category_id
Many2one → hr.salary.rule.category
string='Category'
args: 'hr.salary.rule.category'
child_ids
One2many → hr.salary.rule
copy=True
string='Child Salary Rule'
args: 'hr.salary.rule', 'parent_rule_id'
code
Char
help='The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive.'
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
condition_python
Text
default="# Available variables:\n#-------------------------------\n# payslip: hr.payslip object\n# payslips: object containing payslips (browsable)\n# employee: hr.employee object\n# contract: hr.contract object\n# rules: object containing the rules code (previously computed)\n# categories: object containing the computed salary rule categories\n# (sum of amount of all rules belonging to that category).\n# worked_days: object containing the computed worked days.\n# inputs: object containing the computed inputs.\n# payroll: object containing miscellaneous values related to payroll\n# current_contract: object with values calculated from the current contract\n# result_rules: object with a dict of qty, rate, amount an total of calculated rules\n# tools: object that contain libraries and tools that can be used in calculations\n\n# Available compute variables:\n#-------------------------------\n# result: returned value have to be set in the variable 'result'\n\n# Example:\n#-------------------------------\n# result = worked_days.WORK0 and worked_days.WORK0.number_of_days > 0"
help='Applied this rule for calculation if condition is true. You can specify condition like basic > 1000.'
required=True
string='Python Condition'
condition_range
Char
default='contract.wage'
help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'
string='Range Based on'
condition_range_max
Float
help='The maximum amount, applied for this rule.'
string='Maximum Range'
condition_range_min
Float
help='The minimum amount, applied for this rule.'
string='Minimum Range'
condition_select
Selection
default='none'
required=True
string='Condition Based on'
args: [('none', 'Always True'), ('range', 'Range'), ('python', 'Python Expression')]
input_ids
One2many → hr.rule.input
copy=True
string='Inputs'
args: 'hr.rule.input', 'input_id'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_rule_id
Many2one → hr.salary.rule
comodel_name='hr.salary.rule'
index=True
string='Parent Salary Rule'
quantity
Char
default='1.0'
help='It is used in computation for percentage and fixed amount. For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days.'
register_id
Many2one → hr.contribution.register
help='Eventual third party involved in the salary payment of the employees.'
string='Contribution Register'
args: 'hr.contribution.register'
require_code_and_category
Boolean
compute='_compute_require_code_and_category'
default=<expr>
args: 'Require code and category'
sequence
Integer
default=5
help='Use to arrange calculation sequence'
index=True
required=True
No public methods.
children_ids
One2many → hr.salary.rule.category
string='Children'
args: 'hr.salary.rule.category', 'parent_id'
code
Char
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_id
Many2one → hr.salary.rule.category
help='Linking a salary category to its parent is used only for the reporting purpose.'
string='Parent'
args: 'hr.salary.rule.category'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
salary_rules_ids
One2many → hr.salary.rule
string='Salary Rule Categories'
args: 'hr.salary.rule', 'category_id'
No public methods.
resource_calendar_id
Many2one
help="Employee's working schedule."
schedule_pay
Selection
default='monthly'
help='Defines the frequency of the wage payment.'
index=True
string='Scheduled Pay'
args: [('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semi-annually', 'Semi-annually'), ('annually', 'Annually'), ('weekly', 'Weekly'), ('bi-weekly', 'Bi-weekly'), ('bi-monthly', 'Bi-monthly')]
struct_id
Many2one → hr.payroll.structure
string='Salary Structure'
args: 'hr.payroll.structure'
get_all_structures(self)
date_from
Date
default=datetime.now().strftime('%Y-%m-01')
required=True
date_to
Date
default=<expr>
required=True
print_report(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)get_details_by_rule_category(self, payslip_lines)
get_lines_by_contribution_register(self, payslip_lines)
allow_cancel_payslips
Boolean
config_parameter='payroll.allow_cancel_payslips'
help='Allow users to cancel confirmed payslips.'
string='Allow canceling confirmed payslips'
allow_edit_payslip_lines
Boolean
config_parameter='payroll.allow_edit_payslip_lines'
default=False
help='Allow users to edit some payslip line fields manually'
string='Allow editing payslip lines'
leaves_positive
Boolean
config_parameter='payroll.leaves_positive'
help='In payslip worked days, leave days/hours have positive values'
string='Leaves with positive values'
module_payroll_account
Boolean
string='Payroll Accounting'
prevent_compute_on_confirm
Boolean
config_parameter='payroll.prevent_compute_on_confirm'
default=True
help='Prevent payslips from being recomputed when confirming them'
string='Confirm payslips without recomputing'
require_code_and_category
Boolean
config_parameter='payroll.require_code_and_category'
default=False
help='Require rule.code, rule.category, category.code, structure.code'
string='Require code/category on rules, categories and structures'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/payroll |
| GIT | |
| GIT | https://github.com/OCA/payroll.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/payroll/tree/18.0/payroll |
| VERSION | |
| VERSION | 1.3.2 |
| CATEGORY | |
| CATEGORY | Payroll |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | Yes |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Odoo SA |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Odoo SA |
| COMMITTERS | |
| COMMITTERS | Daniel Reis, Víctor Martínez, Weblate, OCA-git-bot, oca-ci, CristianoMafraJunior, cgarcia-solvos, nimarosa, regispirard, Fanani M. Ihsan, JuanMarta |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/payroll |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 19:30:16 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - hr_contract - hr - base_setup - base - web - digest - bus - web_tour - html_editor - portal - web_editor - http_routing - auth_signup - resource - phone_validation - resource_mail - hr_holidays - calendar |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | Manage your employee payroll records. This module is a backport from Odoo SA and as such, it is not included in the OCA CLA. That means we do not have a copy of the copyright on it like all other OCA modules. |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_contract_view_form |
hr.contract.view.form.payroll | hr.contract | xpath | Inherits hr_contract.hr_contract_view_form |
hr_contribution_register_view_form |
hr.contribution.register.form | hr.contribution.register | form | New |
hr_contribution_register_view_kanban |
hr.contribution.register.kanban | hr.contribution.register | kanban | New |
hr_contribution_register_view_search |
hr.contribution.register.search | hr.contribution.register | search | New |
hr_contribution_register_view_tree |
hr.contribution.register.list | hr.contribution.register | list | New |
hr_employee_view_form |
hr.employee.view.form.payroll | hr.employee | xpath | Inherits hr.view_employee_form |
hr_payroll_structure_view_form |
hr.payroll.structure.form | hr.payroll.structure | form | New |
hr_payroll_structure_view_kanban |
hr.payroll.structure.kanban | hr.payroll.structure | kanban | New |
hr_payroll_structure_view_search |
hr.payroll.structure.select | hr.payroll.structure | search | New |
hr_payroll_structure_view_tree |
hr.payroll.structure.list | hr.payroll.structure | list | New |
hr_payroll_structure_view_tree_children |
hr.payroll.structure.list | hr.payroll.structure | list | New |
hr_payslip_change_state_form |
hr.payslip.change.state.form | hr.payslip.change.state | form | New |
hr_payslip_line_view_form |
hr.payslip.line.form | hr.payslip.line | form | New |
hr_payslip_line_view_pivot |
hr.payslip.line.pivot | hr.payslip.line | pivot | New |
hr_payslip_line_view_search |
hr.payslip.line.select | hr.payslip.line | search | New |
hr_payslip_line_view_tree |
hr.payslip.line.list | hr.payslip.line | list | New |
hr_payslip_run_view_form |
hr.payslip.run.form | hr.payslip.run | form | New |
hr_payslip_run_view_kanban |
hr.payslip.run.kanban | hr.payslip.run | kanban | New |
hr_payslip_run_view_search |
hr.payslip.run.search | hr.payslip.run | search | New |
hr_payslip_run_view_tree |
hr.payslip.run.list | hr.payslip.run | list | New |
hr_payslip_view_form |
hr.payslip.form | hr.payslip | form | New |
hr_payslip_view_kanban |
hr.payslip.kanban | hr.payslip | kanban | New |
hr_payslip_view_search |
hr.payslip.select | hr.payslip | search | New |
hr_payslip_view_tree |
hr.payslip.list | hr.payslip | list | New |
hr_salary_rule_category_view_form |
hr.salary.rule.category.form | hr.salary.rule.category | form | New |
hr_salary_rule_category_view_search |
hr.salary.rule.category.select | hr.salary.rule.category | search | New |
hr_salary_rule_category_view_tree |
hr.salary.rule.category.list | hr.salary.rule.category | list | New |
hr_salary_rule_view_form |
hr.salary.rule.form | hr.salary.rule | form | New |
hr_salary_rule_view_kanban |
hr.salary.rule.kanban | hr.salary.rule | kanban | New |
hr_salary_rule_view_search |
hr.salary.rule.select | hr.salary.rule | search | New |
hr_salary_rule_view_tree |
hr.salary.rule.list | hr.salary.rule | list | New |
hr_salary_rule_view_tree_children |
hr.salary.rule.list | hr.salary.rule | list | New |
report_contributionregister |
report_contributionregister | ir.ui.view | qweb | New |
report_payslip |
report_payslip | ir.ui.view | qweb | New |
report_payslipdetails |
report_payslipdetails | ir.ui.view | qweb | New |
res_config_settings_view_form |
res.config.settings.view.form.inherit.hr.payroll | res.config.settings | xpath | Inherits base.res_config_settings_view_form |
view_hr_payslip_by_employees |
payroll_payslip_employees | hr.payslip.employees | form | New |
view_payslip_lines_contribution_register |
payslip.lines.contribution.register | payslip.lines.contribution.register | form | New |
resource_calendar_id
Many2one
help="Employee's working schedule."
required=True
schedule_pay
Selection
default='monthly'
help='Defines the frequency of the wage payment.'
index=True
string='Scheduled Pay'
args: [('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semi-annually', 'Semi-annually'), ('annually', 'Annually'), ('weekly', 'Weekly'), ('bi-weekly', 'Bi-weekly'), ('bi-monthly', 'Bi-monthly')]
struct_id
Many2one → hr.payroll.structure
string='Salary Structure'
args: 'hr.payroll.structure'
get_all_structures(self)
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
partner_id
Many2one → res.partner
string='Partner'
args: 'res.partner'
register_line_ids
One2many → hr.payslip.line
readonly=True
string='Register Line'
args: 'hr.payslip.line', 'register_id'
No public methods.
payslip_count
Integer
compute='_compute_payslip_count'
groups='payroll.group_payroll_user'
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'employee_id'
No public methods.
children_ids
One2many → hr.payroll.structure
copy=True
string='Children'
args: 'hr.payroll.structure', 'parent_id'
code
Char
string='Reference'
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
parent_id
Many2one → hr.payroll.structure
default=_get_parent
string='Parent'
args: 'hr.payroll.structure'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
rule_ids
Many2many → hr.salary.rule
string='Salary Rules'
args: 'hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id'
copy(self, default=None)
get_all_rules(self)
get_structure_with_parents(self)
allow_cancel_payslips
Boolean
compute='_compute_allow_cancel_payslips'
args: 'Allow Canceling Payslips'
company_id
Many2one → res.company
copy=False
default=<expr>
readonly=True
string='Company'
args: 'res.company'
compute_date
Date
contract_id
Many2one → hr.contract
readonly=True
string='Contract'
tracking=True
args: 'hr.contract'
credit_note
Boolean
help='Indicates this payslip has a refund of another'
readonly=True
date_from
Date
default=<expr>
readonly=True
required=True
tracking=True
date_to
Date
default=<expr>
readonly=True
required=True
tracking=True
dynamic_filtered_payslip_lines
One2many → hr.payslip.line
compute='_compute_dynamic_filtered_payslip_lines'
args: 'hr.payslip.line'
employee_id
Many2one → hr.employee
readonly=True
required=True
string='Employee'
args: 'hr.employee'
hide_child_lines
Boolean
default=False
hide_invisible_lines
Boolean
default=False
string='Show only lines that appear on payslip'
input_line_ids
One2many → hr.payslip.input
readonly=True
string='Payslip Inputs'
args: 'hr.payslip.input', 'payslip_id'
line_ids
One2many → hr.payslip.line
readonly=True
string='Payslip Lines'
args: 'hr.payslip.line', 'slip_id'
name
Char
string='Payslip Name'
note
Text
readonly=True
string='Internal Note'
tracking=True
number
Char
copy=False
readonly=True
string='Reference'
paid
Boolean
copy=False
readonly=True
string='Made Payment Order ? '
payslip_count
Integer
compute='_compute_payslip_count'
string='Payslip Computation Details'
payslip_run_id
Many2one → hr.payslip.run
copy=False
readonly=True
string='Payslip Batches'
tracking=True
args: 'hr.payslip.run'
prevent_compute_on_confirm
Boolean
compute='_compute_prevent_compute_on_confirm'
args: 'Prevent Compute on Confirm'
refunded_id
Many2one → hr.payslip
readonly=True
string='Refunded Payslip'
args: 'hr.payslip'
state
Selection
copy=False
default='draft'
help="* When the payslip is created the status is 'Draft'\n \n* If the payslip is under verification, the status is 'Waiting'.\n \n* If the payslip is confirmed then status is set to 'Done'.\n \n* When user cancel payslip the status is 'Rejected'."
index=True
readonly=True
string='Status'
tracking=True
args: [('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
string='Structure'
args: 'hr.payroll.structure'
worked_days_line_ids
One2many → hr.payslip.worked_days
copy=True
readonly=True
string='Payslip Worked Days'
args: 'hr.payslip.worked_days', 'payslip_id'
action_payslip_cancel(self)
action_payslip_done(self)
action_payslip_draft(self)
compute_sheet(self)
copy(self, default=None)
get_current_contract_dict(self, contract, contracts)
get_inputs(self, contracts, date_from, date_to)
get_lines_dict(self)
get_payroll_dict(self, contracts)
get_payslip_vals(self, date_from, date_to, employee_id=False, contract_id=False, struct_id=False)
get_salary_line_total(self, code)
get_worked_day_lines(self, contracts, date_from, date_to)
localdict_hook(self, localdict)
onchange_contract(self)
onchange_dates(self)
onchange_employee(self)
onchange_struct_id(self)
refund_sheet(self)
unlink(self)
state
Selection
help="* When the payslip is created the status is 'Draft'. \n* If the payslip is under verification, the status is 'Compute Sheet'. \n* If the payslip is confirmed then status is set to 'Done'. \n* When user cancel payslip the status is 'Rejected'."
selection=[('draft', 'Set to Draft'), ('verify', 'Compute Sheet'), ('done', 'Confirm'), ('cancel', 'Cancel Payslip')]
string='Action'
change_state_confirm(self)
employee_ids
Many2many → hr.employee
compute_sheet(self)
amount
Float
help='It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01.'
amount_qty
Float
help='It can be used in computation for other inputs'
args: 'Amount Quantity'
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
allow_edit_payslip_lines
Boolean
compute='_compute_allow_edit_payslip_lines'
args: 'Allow editing'
amount
Monetary
currency_field='currency_id'
child_ids
One2many → hr.payslip.line
string='Child Payslip Lines'
args: 'hr.payslip.line', 'parent_line_id'
contract_id
Many2one → hr.contract
index=True
required=True
string='Contract'
args: 'hr.contract'
currency_id
Many2one
readonly=True
related='contract_id.currency_id'
store=True
date_from
Date
related='slip_id.date_from'
store=True
args: 'Date From'
employee_id
Many2one → hr.employee
required=True
string='Employee'
args: 'hr.employee'
parent_line_id
Many2one → hr.payslip.line
compute='_compute_parent_line_id'
store=True
string='Parent Payslip Line'
args: 'hr.payslip.line'
payslip_run_id
Many2one → hr.payslip.run
related='slip_id.payslip_run_id'
string='Payslip Batch'
args: 'hr.payslip.run'
quantity
Float
default=1.0
digits='Payroll'
rate
Float
default=100.0
digits='Payroll Rate'
string='Rate (%)'
salary_rule_id
Many2one → hr.salary.rule
required=True
string='Rule'
args: 'hr.salary.rule'
slip_id
Many2one → hr.payslip
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
total
Monetary
compute='_compute_total'
currency_field='currency_id'
store=True
create(self, vals_list)
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
credit_note
Boolean
help='If its checked, indicates that all payslips generated from here are refund payslips.'
readonly=True
date_end
Date
default=<expr>
readonly=True
required=True
string='Date To'
date_start
Date
default=<expr>
readonly=True
required=True
string='Date From'
name
Char
readonly=True
required=True
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'payslip_run_id'
state
Selection
copy=False
default='draft'
index=True
readonly=True
string='Status'
tracking=1
args: [('draft', 'Draft'), ('close', 'Close')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip batch, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
string='Structure'
args: 'hr.payroll.structure'
close_payslip_run(self)
draft_payslip_run(self)
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
number_of_days
Float
string='Number of Days'
number_of_hours
Float
string='Number of Hours'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
code
Char
help='The code that can be used in the salary rules'
required=True
input_id
Many2one → hr.salary.rule
required=True
string='Salary Rule Input'
args: 'hr.salary.rule'
name
Char
required=True
string='Description'
No public methods.
active
Boolean
default=True
help='If the active field is set to false, it will allow you to hide the salary rule without removing it.'
amount_fix
Float
digits='Payroll'
string='Fixed Amount'
amount_percentage
Float
digits='Payroll Rate'
help='For example, enter 50.0 to apply a percentage of 50%'
string='Percentage (%)'
amount_percentage_base
Char
help='result will be affected to a variable'
string='Percentage based on'
amount_python_compute
Text
default='# Available variables:\n#-------------------------------\n# payslip: hr.payslip object\n# payslips: object containing payslips (browsable)\n# employee: hr.employee object\n# contract: hr.contract object\n# rules: object containing the rules code (previously computed)\n# categories: object containing the computed salary rule categories\n# (sum of amount of all rules belonging to that category).\n# worked_days: object containing the computed worked days.\n# inputs: object containing the computed inputs.\n# payroll: object containing miscellaneous values related to payroll\n# current_contract: object with values calculated from the current contract\n# result_rules: object with a dict of qty, rate, amount an total of calculated rules\n# tools: object that contain libraries and tools that can be used in calculations\n\n# Available compute variables:\n#-------------------------------\n# result: returned value have to be set in the variable \'result\'\n# result_rate: the rate that will be applied to "result".\n# result_qty: the quantity of units that will be multiplied to "result".\n# result_name: if this variable is computed, it will contain the name of the line.\n\n# Example:\n#-------------------------------\n# result = contract.wage * 0.10'
string='Python Code'
amount_select
Selection
default='fix'
help='The computation method for the rule amount.'
index=True
required=True
string='Amount Type'
args: [('percentage', 'Percentage (%)'), ('fix', 'Fixed Amount'), ('code', 'Python Code')]
appears_on_payslip
Boolean
default=True
help='Used to display the salary rule on payslip.'
string='Appears on Payslip'
category_id
Many2one → hr.salary.rule.category
string='Category'
args: 'hr.salary.rule.category'
child_ids
One2many → hr.salary.rule
copy=True
string='Child Salary Rule'
args: 'hr.salary.rule', 'parent_rule_id'
code
Char
help='The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive.'
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
condition_python
Text
default="# Available variables:\n#-------------------------------\n# payslip: hr.payslip object\n# payslips: object containing payslips (browsable)\n# employee: hr.employee object\n# contract: hr.contract object\n# rules: object containing the rules code (previously computed)\n# categories: object containing the computed salary rule categories\n# (sum of amount of all rules belonging to that category).\n# worked_days: object containing the computed worked days.\n# inputs: object containing the computed inputs.\n# payroll: object containing miscellaneous values related to payroll\n# current_contract: object with values calculated from the current contract\n# result_rules: object with a dict of qty, rate, amount an total of calculated rules\n# tools: object that contain libraries and tools that can be used in calculations\n\n# Available compute variables:\n#-------------------------------\n# result: returned value have to be set in the variable 'result'\n\n# Example:\n#-------------------------------\n# result = worked_days.WORK0 and worked_days.WORK0.number_of_days > 0"
help='Applied this rule for calculation if condition is true. You can specify condition like basic > 1000.'
required=True
string='Python Condition'
condition_range
Char
default='contract.wage'
help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'
string='Range Based on'
condition_range_max
Float
help='The maximum amount, applied for this rule.'
string='Maximum Range'
condition_range_min
Float
help='The minimum amount, applied for this rule.'
string='Minimum Range'
condition_select
Selection
default='none'
required=True
string='Condition Based on'
args: [('none', 'Always True'), ('range', 'Range'), ('python', 'Python Expression')]
input_ids
One2many → hr.rule.input
copy=True
string='Inputs'
args: 'hr.rule.input', 'input_id'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_rule_id
Many2one → hr.salary.rule
comodel_name='hr.salary.rule'
index=True
string='Parent Salary Rule'
quantity
Char
default='1.0'
help='It is used in computation for percentage and fixed amount. For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days.'
register_id
Many2one → hr.contribution.register
help='Eventual third party involved in the salary payment of the employees.'
string='Contribution Register'
args: 'hr.contribution.register'
require_code_and_category
Boolean
compute='_compute_require_code_and_category'
default=<expr>
args: 'Require code and category'
sequence
Integer
default=5
help='Use to arrange calculation sequence'
index=True
required=True
No public methods.
children_ids
One2many → hr.salary.rule.category
string='Children'
args: 'hr.salary.rule.category', 'parent_id'
code
Char
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_id
Many2one → hr.salary.rule.category
help='Linking a salary category to its parent is used only for the reporting purpose.'
string='Parent'
args: 'hr.salary.rule.category'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
salary_rules_ids
One2many → hr.salary.rule
string='Salary Rule Categories'
args: 'hr.salary.rule', 'category_id'
No public methods.
date_from
Date
default=datetime.now().strftime('%Y-%m-01')
required=True
date_to
Date
default=<expr>
required=True
print_report(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)get_details_by_rule_category(self, payslip_lines)
get_lines_by_contribution_register(self, payslip_lines)
allow_cancel_payslips
Boolean
config_parameter='payroll.allow_cancel_payslips'
help='Allow users to cancel confirmed payslips.'
string='Allow canceling confirmed payslips'
allow_edit_payslip_lines
Boolean
config_parameter='payroll.allow_edit_payslip_lines'
default=False
help='Allow users to edit some payslip line fields manually'
string='Allow editing payslip lines'
leaves_positive
Boolean
config_parameter='payroll.leaves_positive'
help='In payslip worked days, leave days/hours have positive values'
string='Leaves with positive values'
module_payroll_account
Boolean
string='Payroll Accounting'
prevent_compute_on_confirm
Boolean
config_parameter='payroll.prevent_compute_on_confirm'
default=True
help='Prevent payslips from being recomputed when confirming them'
string='Confirm payslips without recomputing'
require_code_and_category
Boolean
config_parameter='payroll.require_code_and_category'
default=False
help='Require rule.code, rule.category, category.code, structure.code'
string='Require code/category on rules, categories and structures'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/payroll |
| GIT | |
| GIT | https://github.com/OCA/payroll.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/payroll/tree/17.0/payroll |
| VERSION | |
| VERSION | 1.2.1 |
| CATEGORY | |
| CATEGORY | Payroll |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | Yes |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Odoo SA |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Odoo SA |
| COMMITTERS | |
| COMMITTERS | Daniel Reis, Víctor Martínez, Weblate, OCA-git-bot, oca-ci, David Alonso // Solvos, CristianoMafraJunior, FernandoRomera, Bhavesh Heliconia, Henry Apolinario |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/payroll |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 19:20:08 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - hr_contract - hr - base_setup - base - web - phone_validation - bus - web_tour - resource - hr_holidays - calendar - onboarding |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | Manage your employee payroll records. This module is a backport from Odoo SA and as such, it is not included in the OCA CLA. That means we do not have a copy of the copyright on it like all other OCA modules. |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_contract_view_form |
hr.contract.view.form.payroll | hr.contract | xpath | Inherits hr_contract.hr_contract_view_form |
hr_contribution_register_view_form |
hr.contribution.register.form | hr.contribution.register | form | New |
hr_contribution_register_view_kanban |
hr.contribution.register.kanban | hr.contribution.register | kanban | New |
hr_contribution_register_view_search |
hr.contribution.register.search | hr.contribution.register | search | New |
hr_contribution_register_view_tree |
hr.contribution.register.tree | hr.contribution.register | tree | New |
hr_employee_view_form |
hr.employee.view.form.payroll | hr.employee | xpath | Inherits hr.view_employee_form |
hr_leave_type_view_form |
hr.leave.type.view.form.payroll | hr.leave.type | xpath | Inherits hr_holidays.edit_holiday_status_form |
hr_payroll_structure_view_form |
hr.payroll.structure.form | hr.payroll.structure | form | New |
hr_payroll_structure_view_kanban |
hr.payroll.structure.kanban | hr.payroll.structure | kanban | New |
hr_payroll_structure_view_search |
hr.payroll.structure.select | hr.payroll.structure | search | New |
hr_payroll_structure_view_tree |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payroll_structure_view_tree_children |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payslip_change_state_form |
hr.payslip.change.state.form | hr.payslip.change.state | form | New |
hr_payslip_line_view_form |
hr.payslip.line.form | hr.payslip.line | form | New |
hr_payslip_line_view_pivot |
hr.payslip.line.pivot | hr.payslip.line | pivot | New |
hr_payslip_line_view_search |
hr.payslip.line.select | hr.payslip.line | search | New |
hr_payslip_line_view_tree |
hr.payslip.line.tree | hr.payslip.line | tree | New |
hr_payslip_run_view_form |
hr.payslip.run.form | hr.payslip.run | form | New |
hr_payslip_run_view_kanban |
hr.payslip.run.kanban | hr.payslip.run | kanban | New |
hr_payslip_run_view_search |
hr.payslip.run.search | hr.payslip.run | search | New |
hr_payslip_run_view_tree |
hr.payslip.run.tree | hr.payslip.run | tree | New |
hr_payslip_view_form |
hr.payslip.form | hr.payslip | form | New |
hr_payslip_view_kanban |
hr.payslip.kanban | hr.payslip | kanban | New |
hr_payslip_view_search |
hr.payslip.select | hr.payslip | search | New |
hr_payslip_view_tree |
hr.payslip.tree | hr.payslip | tree | New |
hr_salary_rule_category_view_form |
hr.salary.rule.category.form | hr.salary.rule.category | form | New |
hr_salary_rule_category_view_search |
hr.salary.rule.category.select | hr.salary.rule.category | search | New |
hr_salary_rule_category_view_tree |
hr.salary.rule.category.tree | hr.salary.rule.category | tree | New |
hr_salary_rule_view_form |
hr.salary.rule.form | hr.salary.rule | form | New |
hr_salary_rule_view_kanban |
hr.salary.rule.kanban | hr.salary.rule | kanban | New |
hr_salary_rule_view_search |
hr.salary.rule.select | hr.salary.rule | search | New |
hr_salary_rule_view_tree |
hr.salary.rule.tree | hr.salary.rule | tree | New |
hr_salary_rule_view_tree_children |
hr.salary.rule.list | hr.salary.rule | tree | New |
report_contributionregister |
report_contributionregister | ir.ui.view | qweb | New |
report_payslip |
report_payslip | ir.ui.view | qweb | New |
report_payslipdetails |
report_payslipdetails | ir.ui.view | qweb | New |
res_config_settings_view_form |
res.config.settings.view.form.inherit.hr.payroll | res.config.settings | xpath | Inherits base.res_config_settings_view_form |
view_hr_payslip_by_employees |
payroll_payslip_employees | hr.payslip.employees | form | New |
view_payslip_lines_contribution_register |
payslip.lines.contribution.register | payslip.lines.contribution.register | form | New |
resource_calendar_id
Many2one
help="Employee's working schedule."
required=True
schedule_pay
Selection
default='monthly'
help='Defines the frequency of the wage payment.'
index=True
string='Scheduled Pay'
args: [('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semi-annually', 'Semi-annually'), ('annually', 'Annually'), ('weekly', 'Weekly'), ('bi-weekly', 'Bi-weekly'), ('bi-monthly', 'Bi-monthly')]
struct_id
Many2one → hr.payroll.structure
string='Salary Structure'
args: 'hr.payroll.structure'
get_all_structures(self)
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
partner_id
Many2one → res.partner
string='Partner'
args: 'res.partner'
register_line_ids
One2many → hr.payslip.line
readonly=True
string='Register Line'
args: 'hr.payslip.line', 'register_id'
No public methods.
payslip_count
Integer
compute='_compute_payslip_count'
groups='payroll.group_payroll_user'
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'employee_id'
No public methods.
code
Char
string='Payroll Code'
No public methods.
children_ids
One2many → hr.payroll.structure
copy=True
string='Children'
args: 'hr.payroll.structure', 'parent_id'
code
Char
string='Reference'
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
parent_id
Many2one → hr.payroll.structure
default=_get_parent
string='Parent'
args: 'hr.payroll.structure'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
rule_ids
Many2many → hr.salary.rule
string='Salary Rules'
args: 'hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id'
copy(self, default=None)
get_all_rules(self)
allow_cancel_payslips
Boolean
compute='_compute_allow_cancel_payslips'
args: 'Allow Canceling Payslips'
company_id
Many2one → res.company
copy=False
default=<expr>
readonly=True
string='Company'
args: 'res.company'
compute_date
Date
contract_id
Many2one → hr.contract
readonly=True
string='Contract'
tracking=True
args: 'hr.contract'
credit_note
Boolean
help='Indicates this payslip has a refund of another'
readonly=True
date_from
Date
default=<expr>
readonly=True
required=True
tracking=True
date_to
Date
default=<expr>
readonly=True
required=True
tracking=True
dynamic_filtered_payslip_lines
One2many → hr.payslip.line
compute='_compute_dynamic_filtered_payslip_lines'
args: 'hr.payslip.line'
employee_id
Many2one → hr.employee
readonly=True
required=True
string='Employee'
args: 'hr.employee'
hide_child_lines
Boolean
default=False
hide_invisible_lines
Boolean
default=False
string='Show only lines that appear on payslip'
input_line_ids
One2many → hr.payslip.input
readonly=True
string='Payslip Inputs'
args: 'hr.payslip.input', 'payslip_id'
line_ids
One2many → hr.payslip.line
readonly=True
string='Payslip Lines'
args: 'hr.payslip.line', 'slip_id'
name
Char
string='Payslip Name'
note
Text
readonly=True
string='Internal Note'
tracking=True
number
Char
copy=False
readonly=True
string='Reference'
paid
Boolean
copy=False
readonly=True
string='Made Payment Order ? '
payslip_count
Integer
compute='_compute_payslip_count'
string='Payslip Computation Details'
payslip_run_id
Many2one → hr.payslip.run
copy=False
readonly=True
string='Payslip Batches'
tracking=True
args: 'hr.payslip.run'
prevent_compute_on_confirm
Boolean
compute='_compute_prevent_compute_on_confirm'
args: 'Prevent Compute on Confirm'
refunded_id
Many2one → hr.payslip
readonly=True
string='Refunded Payslip'
args: 'hr.payslip'
state
Selection
copy=False
default='draft'
help="* When the payslip is created the status is 'Draft'\n \n* If the payslip is under verification, the status is 'Waiting'.\n \n* If the payslip is confirmed then status is set to 'Done'.\n \n* When user cancel payslip the status is 'Rejected'."
index=True
readonly=True
string='Status'
tracking=True
args: [('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
string='Structure'
args: 'hr.payroll.structure'
worked_days_line_ids
One2many → hr.payslip.worked_days
copy=True
readonly=True
string='Payslip Worked Days'
args: 'hr.payslip.worked_days', 'payslip_id'
action_payslip_cancel(self)
action_payslip_done(self)
action_payslip_draft(self)
compute_sheet(self)
copy(self, default=None)
get_current_contract_dict(self, contract, contracts)
get_inputs(self, contracts, date_from, date_to)
get_lines_dict(self)
get_payroll_dict(self, contracts)
get_payslip_vals(self, date_from, date_to, employee_id=False, contract_id=False, struct_id=False)
get_salary_line_total(self, code)
get_worked_day_lines(self, contracts, date_from, date_to)
line_sum_where(self, field_name, value, rules, result_rules)
localdict_hook(self, localdict)
onchange_contract(self)
onchange_dates(self)
onchange_employee(self)
onchange_struct_id(self)
refund_sheet(self)
unlink(self)
state
Selection
help="* When the payslip is created the status is 'Draft'. \n* If the payslip is under verification, the status is 'Compute Sheet'. \n* If the payslip is confirmed then status is set to 'Done'. \n* When user cancel payslip the status is 'Rejected'."
selection=[('draft', 'Set to Draft'), ('verify', 'Compute Sheet'), ('done', 'Confirm'), ('cancel', 'Cancel Payslip')]
string='Action'
change_state_confirm(self)
employee_ids
Many2many → hr.employee
compute_sheet(self)
amount
Float
help='It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01.'
amount_qty
Float
help='It can be used in computation for other inputs'
args: 'Amount Quantity'
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
allow_edit_payslip_lines
Boolean
compute='_compute_allow_edit_payslip_lines'
args: 'Allow editing'
amount
Monetary
currency_field='currency_id'
digits='Payroll'
child_ids
One2many → hr.payslip.line
string='Child Payslip Lines'
args: 'hr.payslip.line', 'parent_line_id'
contract_id
Many2one → hr.contract
index=True
required=True
string='Contract'
args: 'hr.contract'
currency_id
Many2one
readonly=True
related='contract_id.currency_id'
store=True
date_from
Date
related='slip_id.date_from'
store=True
args: 'Date From'
employee_id
Many2one → hr.employee
required=True
string='Employee'
args: 'hr.employee'
parent_line_id
Many2one → hr.payslip.line
compute='_compute_parent_line_id'
store=True
string='Parent Payslip Line'
args: 'hr.payslip.line'
payslip_run_id
Many2one → hr.payslip.run
related='slip_id.payslip_run_id'
string='Payslip Batch'
args: 'hr.payslip.run'
quantity
Float
default=1.0
digits='Payroll'
rate
Float
default=100.0
digits='Payroll Rate'
string='Rate (%)'
salary_rule_id
Many2one → hr.salary.rule
required=True
string='Rule'
args: 'hr.salary.rule'
slip_id
Many2one → hr.payslip
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
total
Monetary
compute='_compute_total'
currency_field='currency_id'
digits='Payroll'
store=True
create(self, vals_list)
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
credit_note
Boolean
help='If its checked, indicates that all payslips generated from here are refund payslips.'
readonly=True
date_end
Date
default=<expr>
readonly=True
required=True
string='Date To'
date_start
Date
default=<expr>
readonly=True
required=True
string='Date From'
name
Char
readonly=True
required=True
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'payslip_run_id'
state
Selection
copy=False
default='draft'
index=True
readonly=True
string='Status'
tracking=1
args: [('draft', 'Draft'), ('close', 'Close')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip batch, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
string='Structure'
args: 'hr.payroll.structure'
close_payslip_run(self)
draft_payslip_run(self)
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
number_of_days
Float
string='Number of Days'
number_of_hours
Float
string='Number of Hours'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
code
Char
help='The code that can be used in the salary rules'
required=True
input_id
Many2one → hr.salary.rule
required=True
string='Salary Rule Input'
args: 'hr.salary.rule'
name
Char
required=True
string='Description'
No public methods.
active
Boolean
default=True
help='If the active field is set to false, it will allow you to hide the salary rule without removing it.'
amount_fix
Float
digits='Payroll'
string='Fixed Amount'
amount_percentage
Float
digits='Payroll Rate'
help='For example, enter 50.0 to apply a percentage of 50%'
string='Percentage (%)'
amount_percentage_base
Char
help='result will be affected to a variable'
string='Percentage based on'
amount_python_compute
Text
default='\n # Available variables:\n #-------------------------------\n # payslip: hr.payslip object\n # payslips: object containing payslips (browsable)\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n # payroll: object containing miscellaneous values related to payroll\n # current_contract: object with values calculated from the current contract\n # result_rules: object with a dict of qty, rate, amount an total of calculated rules\n # tools: object that contain libraries and tools that can be used in calculations\n\n # Available compute variables:\n #-------------------------------\n # result: returned value have to be set in the variable \'result\'\n # result_rate: the rate that will be applied to "result".\n # result_qty: the quantity of units that will be multiplied to "result".\n # result_name: if this variable is computed, it will contain the name of the line.\n\n # Example:\n #-------------------------------\n # result = contract.wage * 0.10\n\n '
string='Python Code'
amount_select
Selection
default='fix'
help='The computation method for the rule amount.'
index=True
required=True
string='Amount Type'
args: [('percentage', 'Percentage (%)'), ('fix', 'Fixed Amount'), ('code', 'Python Code')]
appears_on_payslip
Boolean
default=True
help='Used to display the salary rule on payslip.'
string='Appears on Payslip'
category_id
Many2one → hr.salary.rule.category
string='Category'
args: 'hr.salary.rule.category'
child_ids
One2many → hr.salary.rule
copy=True
string='Child Salary Rule'
args: 'hr.salary.rule', 'parent_rule_id'
code
Char
help='The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive.'
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
condition_python
Text
default="\n # Available variables:\n #-------------------------------\n # payslip: hr.payslip object\n # payslips: object containing payslips (browsable)\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n # payroll: object containing miscellaneous values related to payroll\n # current_contract: object with values calculated from the current contract\n # result_rules: object with a dict of qty, rate, amount an total of calculated rules\n # tools: object that contain libraries and tools that can be used in calculations\n\n # Available compute variables:\n #-------------------------------\n # result: returned value have to be set in the variable 'result'\n\n # Example:\n #-------------------------------\n # result = worked_days.WORK0 and worked_days.WORK0.number_of_days > 0\n\n "
help='Applied this rule for calculation if condition is true. You can specify condition like basic > 1000.'
required=True
string='Python Condition'
condition_range
Char
default='contract.wage'
help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'
string='Range Based on'
condition_range_max
Float
help='The maximum amount, applied for this rule.'
string='Maximum Range'
condition_range_min
Float
help='The minimum amount, applied for this rule.'
string='Minimum Range'
condition_select
Selection
default='none'
required=True
string='Condition Based on'
args: [('none', 'Always True'), ('range', 'Range'), ('python', 'Python Expression')]
input_ids
One2many → hr.rule.input
copy=True
string='Inputs'
args: 'hr.rule.input', 'input_id'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_rule_id
Many2one → hr.salary.rule
index=True
string='Parent Salary Rule'
args: 'hr.salary.rule'
quantity
Char
default='1.0'
help='It is used in computation for percentage and fixed amount. For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days.'
register_id
Many2one → hr.contribution.register
help='Eventual third party involved in the salary payment of the employees.'
string='Contribution Register'
args: 'hr.contribution.register'
require_code_and_category
Boolean
compute='_compute_require_code_and_category'
default=<expr>
args: 'Require code and category'
sequence
Integer
default=5
help='Use to arrange calculation sequence'
index=True
required=True
No public methods.
children_ids
One2many → hr.salary.rule.category
string='Children'
args: 'hr.salary.rule.category', 'parent_id'
code
Char
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_id
Many2one → hr.salary.rule.category
help='Linking a salary category to its parent is used only for the reporting purpose.'
string='Parent'
args: 'hr.salary.rule.category'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
salary_rules_ids
One2many → hr.salary.rule
string='Salary Rule Categories'
args: 'hr.salary.rule', 'category_id'
No public methods.
date_from
Date
default=datetime.now().strftime('%Y-%m-01')
required=True
date_to
Date
default=<expr>
required=True
print_report(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)get_details_by_rule_category(self, payslip_lines)
get_lines_by_contribution_register(self, payslip_lines)
allow_cancel_payslips
Boolean
config_parameter='payroll.allow_cancel_payslips'
help='Allow users to cancel confirmed payslips.'
string='Allow canceling confirmed payslips'
allow_edit_payslip_lines
Boolean
config_parameter='payroll.allow_edit_payslip_lines'
default=False
help='Allow users to edit some payslip line fields manually'
string='Allow editing payslip lines'
leaves_positive
Boolean
config_parameter='payroll.leaves_positive'
help='In payslip worked days, leave days/hours have positive values'
string='Leaves with positive values'
module_payroll_account
Boolean
string='Payroll Accounting'
prevent_compute_on_confirm
Boolean
config_parameter='payroll.prevent_compute_on_confirm'
default=True
help='Prevent payslips from being recomputed when confirming them'
string='Confirm payslips without recomputing'
require_code_and_category
Boolean
config_parameter='payroll.require_code_and_category'
default=False
help='Require rule.code, rule.category, category.code, structure.code'
string='Require code/category on rules, categories and structures'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/payroll |
| GIT | |
| GIT | https://github.com/OCA/payroll.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/payroll/tree/16.0/payroll |
| VERSION | |
| VERSION | 1.6.4 |
| CATEGORY | |
| CATEGORY | Payroll |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | Yes |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Odoo SA |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Odoo SA |
| COMMITTERS | |
| COMMITTERS | Víctor Martínez, Weblate, OCA-git-bot, Cyril VINH-TUNG, oca-ci, Justine Doutreloux, Gil Arasa Verge, CristianoMafraJunior, Cristiano Mafra Junior, Michael Telahun, Henrik Norlin |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/payroll |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:53:53 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - hr_contract - hr - base_setup - base - web - bus - web_tour - resource - hr_holidays - calendar |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_contract_view_form |
hr.contract.view.form.payroll | hr.contract | xpath | Inherits hr_contract.hr_contract_view_form |
hr_contribution_register_view_form |
hr.contribution.register.form | hr.contribution.register | form | New |
hr_contribution_register_view_kanban |
hr.contribution.register.kanban | hr.contribution.register | kanban | New |
hr_contribution_register_view_search |
hr.contribution.register.search | hr.contribution.register | search | New |
hr_contribution_register_view_tree |
hr.contribution.register.tree | hr.contribution.register | tree | New |
hr_employee_view_form |
hr.employee.view.form.payroll | hr.employee | xpath | Inherits hr.view_employee_form |
hr_leave_type_view_form |
hr.leave.type.view.form.payroll | hr.leave.type | xpath | Inherits hr_holidays.edit_holiday_status_form |
hr_payroll_structure_view_form |
hr.payroll.structure.form | hr.payroll.structure | form | New |
hr_payroll_structure_view_kanban |
hr.payroll.structure.kanban | hr.payroll.structure | kanban | New |
hr_payroll_structure_view_search |
hr.payroll.structure.select | hr.payroll.structure | search | New |
hr_payroll_structure_view_tree |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payroll_structure_view_tree_children |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payslip_change_state_form |
hr.payslip.change.state.form | hr.payslip.change.state | form | New |
hr_payslip_input_view_search |
hr.payslip.input.search | hr.payslip.input | search | New |
hr_payslip_input_view_tree |
hr.payslip.input.tree | hr.payslip.input | tree | New |
hr_payslip_line_view_form |
hr.payslip.line.form | hr.payslip.line | form | New |
hr_payslip_line_view_pivot |
hr.payslip.line.pivot | hr.payslip.line | pivot | New |
hr_payslip_line_view_search |
hr.payslip.line.select | hr.payslip.line | search | New |
hr_payslip_line_view_tree |
hr.payslip.line.tree | hr.payslip.line | tree | New |
hr_payslip_run_view_form |
hr.payslip.run.form | hr.payslip.run | form | New |
hr_payslip_run_view_kanban |
hr.payslip.run.kanban | hr.payslip.run | kanban | New |
hr_payslip_run_view_search |
hr.payslip.run.search | hr.payslip.run | search | New |
hr_payslip_run_view_tree |
hr.payslip.run.tree | hr.payslip.run | tree | New |
hr_payslip_view_form |
hr.payslip.form | hr.payslip | form | New |
hr_payslip_view_kanban |
hr.payslip.kanban | hr.payslip | kanban | New |
hr_payslip_view_search |
hr.payslip.select | hr.payslip | search | New |
hr_payslip_view_tree |
hr.payslip.tree | hr.payslip | tree | New |
hr_salary_rule_category_view_form |
hr.salary.rule.category.form | hr.salary.rule.category | form | New |
hr_salary_rule_category_view_search |
hr.salary.rule.category.select | hr.salary.rule.category | search | New |
hr_salary_rule_category_view_tree |
hr.salary.rule.category.tree | hr.salary.rule.category | tree | New |
hr_salary_rule_view_form |
hr.salary.rule.form | hr.salary.rule | form | New |
hr_salary_rule_view_kanban |
hr.salary.rule.kanban | hr.salary.rule | kanban | New |
hr_salary_rule_view_search |
hr.salary.rule.select | hr.salary.rule | search | New |
hr_salary_rule_view_tree |
hr.salary.rule.tree | hr.salary.rule | tree | New |
hr_salary_rule_view_tree_children |
hr.salary.rule.list | hr.salary.rule | tree | New |
report_contributionregister |
report_contributionregister | ir.ui.view | qweb | New |
report_payslip |
report_payslip | ir.ui.view | qweb | New |
report_payslipdetails |
report_payslipdetails | ir.ui.view | qweb | New |
res_config_settings_view_form |
res.config.settings.view.form.inherit.hr.payroll | res.config.settings | xpath | Inherits base.res_config_settings_view_form |
view_hr_payslip_by_employees |
payroll_payslip_employees | hr.payslip.employees | form | New |
view_payslip_lines_contribution_register |
payslip.lines.contribution.register | payslip.lines.contribution.register | form | New |
resource_calendar_id
Many2one
help="Employee's working schedule."
required=True
schedule_pay
Selection
default='monthly'
help='Defines the frequency of the wage payment.'
index=True
string='Scheduled Pay'
args: [('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semi-annually', 'Semi-annually'), ('annually', 'Annually'), ('weekly', 'Weekly'), ('bi-weekly', 'Bi-weekly'), ('bi-monthly', 'Bi-monthly')]
struct_id
Many2one → hr.payroll.structure
string='Salary Structure'
args: 'hr.payroll.structure'
get_all_structures(self)
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
partner_id
Many2one → res.partner
string='Partner'
args: 'res.partner'
register_line_ids
One2many → hr.payslip.line
readonly=True
string='Register Line'
args: 'hr.payslip.line', 'register_id'
No public methods.
payslip_count
Integer
compute='_compute_payslip_count'
groups='payroll.group_payroll_user'
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'employee_id'
No public methods.
code
Char
string='Payroll Code'
No public methods.
children_ids
One2many → hr.payroll.structure
copy=True
string='Children'
args: 'hr.payroll.structure', 'parent_id'
code
Char
string='Reference'
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
parent_id
Many2one → hr.payroll.structure
default=_get_parent
string='Parent'
args: 'hr.payroll.structure'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
rule_ids
Many2many → hr.salary.rule
string='Salary Rules'
args: 'hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id'
copy(self, default=None)
get_all_rules(self)
allow_cancel_payslips
Boolean
compute='_compute_allow_cancel_payslips'
args: 'Allow Canceling Payslips'
company_id
Many2one → res.company
copy=False
default=<expr>
readonly=True
states={'draft': [('readonly', False)]}
string='Company'
args: 'res.company'
compute_date
Date
contract_id
Many2one → hr.contract
readonly=True
states={'draft': [('readonly', False)]}
string='Contract'
tracking=True
args: 'hr.contract'
credit_note
Boolean
help='Indicates this payslip has a refund of another'
readonly=True
states={'draft': [('readonly', False)]}
date_from
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
tracking=True
date_to
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
tracking=True
dynamic_filtered_payslip_lines
One2many → hr.payslip.line
compute='_compute_dynamic_filtered_payslip_lines'
args: 'hr.payslip.line'
employee_id
Many2one → hr.employee
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Employee'
args: 'hr.employee'
hide_child_lines
Boolean
default=False
hide_invisible_lines
Boolean
default=False
string='Show only lines that appear on payslip'
input_line_ids
One2many → hr.payslip.input
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Inputs'
args: 'hr.payslip.input', 'payslip_id'
line_ids
One2many → hr.payslip.line
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Lines'
args: 'hr.payslip.line', 'slip_id'
name
Char
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Name'
note
Text
readonly=True
states={'draft': [('readonly', False)]}
string='Internal Note'
tracking=True
number
Char
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Reference'
paid
Boolean
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Made Payment Order ? '
payslip_count
Integer
compute='_compute_payslip_count'
string='Payslip Computation Details'
payslip_run_id
Many2one → hr.payslip.run
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Batches'
tracking=True
args: 'hr.payslip.run'
prevent_compute_on_confirm
Boolean
compute='_compute_prevent_compute_on_confirm'
args: 'Prevent Compute on Confirm'
refunded_id
Many2one → hr.payslip
readonly=True
string='Refunded Payslip'
args: 'hr.payslip'
state
Selection
copy=False
default='draft'
help="* When the payslip is created the status is 'Draft'\n \n* If the payslip is under verification, the status is 'Waiting'.\n \n* If the payslip is confirmed then status is set to 'Done'.\n \n* When user cancel payslip the status is 'Rejected'."
index=True
readonly=True
string='Status'
tracking=True
args: [('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
states={'draft': [('readonly', False)]}
string='Structure'
args: 'hr.payroll.structure'
worked_days_line_ids
One2many → hr.payslip.worked_days
copy=True
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Worked Days'
args: 'hr.payslip.worked_days', 'payslip_id'
action_payslip_cancel(self)
action_payslip_done(self)
action_payslip_draft(self)
compute_sheet(self)
copy(self, default=None)
get_current_contract_dict(self, contract, contracts)
get_inputs(self, contracts, date_from, date_to)
get_lines_dict(self)
get_payroll_dict(self, contracts)
get_payslip_vals(self, date_from, date_to, employee_id=False, contract_id=False, struct_id=False)
get_salary_line_total(self, code)
get_worked_day_lines(self, contracts, date_from, date_to)
line_sum_where(self, field_name, value, rules, result_rules)
localdict_hook(self, localdict)
onchange_contract(self)
onchange_dates(self)
onchange_employee(self)
onchange_struct_id(self)
refund_sheet(self)
unlink(self)
state
Selection
help="* When the payslip is created the status is 'Draft'. \n* If the payslip is under verification, the status is 'Compute Sheet'. \n* If the payslip is confirmed then status is set to 'Done'. \n* When user cancel payslip the status is 'Rejected'."
selection=[('draft', 'Set to Draft'), ('verify', 'Compute Sheet'), ('done', 'Confirm'), ('cancel', 'Cancel Payslip')]
string='Action'
change_state_confirm(self)
employee_ids
Many2many → hr.employee
compute_sheet(self)
amount
Float
help='It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01.'
amount_qty
Float
help='It can be used in computation for other inputs'
args: 'Amount Quantity'
code
Char
help='The code that can be used in the salary rules'
required=True
company_id
Many2one
related='payslip_id.company_id'
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
allow_edit_payslip_lines
Boolean
compute='_compute_allow_edit_payslip_lines'
args: 'Allow editing'
amount
Monetary
currency_field='currency_id'
child_ids
One2many → hr.payslip.line
string='Child Payslip Lines'
args: 'hr.payslip.line', 'parent_line_id'
contract_id
Many2one → hr.contract
index=True
required=True
string='Contract'
args: 'hr.contract'
currency_id
Many2one
readonly=True
related='contract_id.currency_id'
store=True
date_from
Date
related='slip_id.date_from'
store=True
args: 'Date From'
employee_id
Many2one → hr.employee
required=True
string='Employee'
args: 'hr.employee'
parent_line_id
Many2one → hr.payslip.line
compute='_compute_parent_line_id'
store=True
string='Parent Payslip Line'
args: 'hr.payslip.line'
payslip_run_id
Many2one → hr.payslip.run
related='slip_id.payslip_run_id'
string='Payslip Batch'
args: 'hr.payslip.run'
quantity
Float
default=1.0
digits='Payroll'
rate
Float
default=100.0
digits='Payroll Rate'
string='Rate (%)'
salary_rule_id
Many2one → hr.salary.rule
required=True
string='Rule'
args: 'hr.salary.rule'
slip_id
Many2one → hr.payslip
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
total
Monetary
compute='_compute_total'
currency_field='currency_id'
store=True
create(self, vals_list)
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
credit_note
Boolean
help='If its checked, indicates that all payslips generated from here are refund payslips.'
readonly=True
states={'draft': [('readonly', False)]}
date_end
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date To'
date_start
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date From'
name
Char
readonly=True
required=True
states={'draft': [('readonly', False)]}
slip_ids
One2many → hr.payslip
readonly=True
states={'draft': [('readonly', False)]}
string='Payslips'
args: 'hr.payslip', 'payslip_run_id'
state
Selection
copy=False
default='draft'
index=True
readonly=True
string='Status'
tracking=1
args: [('draft', 'Draft'), ('close', 'Close')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip batch, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
states={'draft': [('readonly', False)]}
string='Structure'
args: 'hr.payroll.structure'
close_payslip_run(self)
draft_payslip_run(self)
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
number_of_days
Float
string='Number of Days'
number_of_hours
Float
string='Number of Hours'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
code
Char
help='The code that can be used in the salary rules'
required=True
input_id
Many2one → hr.salary.rule
required=True
string='Salary Rule Input'
args: 'hr.salary.rule'
name
Char
required=True
string='Description'
No public methods.
active
Boolean
default=True
help='If the active field is set to false, it will allow you to hide the salary rule without removing it.'
amount_fix
Float
digits='Payroll'
string='Fixed Amount'
amount_percentage
Float
digits='Payroll Rate'
help='For example, enter 50.0 to apply a percentage of 50%'
string='Percentage (%)'
amount_percentage_base
Char
help='result will be affected to a variable'
string='Percentage based on'
amount_python_compute
Text
default='\n # Available variables:\n #-------------------------------\n # payslip: hr.payslip object\n # payslips: object containing payslips (browsable)\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n # payroll: object containing miscellaneous values related to payroll\n # current_contract: object with values calculated from\n # the current contract\n # result_rules: object with a dict of qty, rate, amount,\n # and total of calculated rules\n # tools: object that contain libraries and tools that\n # can be used in calculations\n\n # Available compute variables:\n #-------------------------------\n # result: returned value have to be set in the variable \'result\'\n # result_rate: the rate that will be applied to "result".\n # result_qty: the quantity of units that will be multiplied to "result".\n # result_name: if this variable is computed, it will\n # contain the name of the line.\n\n # Example:\n #-------------------------------\n # result = contract.wage * 0.10\n\n '
string='Python Code'
amount_select
Selection
default='fix'
help='The computation method for the rule amount.'
index=True
required=True
string='Amount Type'
args: [('percentage', 'Percentage (%)'), ('fix', 'Fixed Amount'), ('code', 'Python Code')]
appears_on_payslip
Boolean
default=True
help='Used to display the salary rule on payslip.'
string='Appears on Payslip'
category_id
Many2one → hr.salary.rule.category
string='Category'
args: 'hr.salary.rule.category'
child_ids
One2many → hr.salary.rule
copy=True
string='Child Salary Rule'
args: 'hr.salary.rule', 'parent_rule_id'
code
Char
help='The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive.'
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
condition_python
Text
default="\n # Available variables:\n #-------------------------------\n # payslip: hr.payslip object\n # payslips: object containing payslips (browsable)\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n # payroll: object containing miscellaneous values related to payroll\n # current_contract: object with values calculated from the current contract\n # result_rules: object with a dict of qty, rate, amount,\n # and total of calculated rules\n # tools: object that contain libraries and tools that\n # can be used in calculations\n\n # Available compute variables:\n #-------------------------------\n # result: returned value have to be set in the variable 'result'\n\n # Example:\n #-------------------------------\n # result = worked_days.WORK0 and worked_days.WORK0.number_of_days > 0\n\n "
help='Applied this rule for calculation if condition is true. You can specify condition like basic > 1000.'
required=True
string='Python Condition'
condition_range
Char
default='contract.wage'
help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'
string='Range Based on'
condition_range_max
Float
help='The maximum amount, applied for this rule.'
string='Maximum Range'
condition_range_min
Float
help='The minimum amount, applied for this rule.'
string='Minimum Range'
condition_select
Selection
default='none'
required=True
string='Condition Based on'
args: [('none', 'Always True'), ('range', 'Range'), ('python', 'Python Expression')]
input_ids
One2many → hr.rule.input
copy=True
string='Inputs'
args: 'hr.rule.input', 'input_id'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_rule_id
Many2one → hr.salary.rule
index=True
string='Parent Salary Rule'
args: 'hr.salary.rule'
quantity
Char
default='1.0'
help='It is used in computation for percentage and fixed amount. For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days.'
register_id
Many2one → hr.contribution.register
help='Eventual third party involved in the salary payment of the employees.'
string='Contribution Register'
args: 'hr.contribution.register'
require_code_and_category
Boolean
compute='_compute_require_code_and_category'
default=<expr>
args: 'Require code and category'
sequence
Integer
default=5
help='Use to arrange calculation sequence'
index=True
required=True
No public methods.
children_ids
One2many → hr.salary.rule.category
string='Children'
args: 'hr.salary.rule.category', 'parent_id'
code
Char
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_id
Many2one → hr.salary.rule.category
help='Linking a salary category to its parent is used only for the reporting purpose.'
string='Parent'
args: 'hr.salary.rule.category'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
salary_rules_ids
One2many → hr.salary.rule
string='Salary Rule Categories'
args: 'hr.salary.rule', 'category_id'
No public methods.
date_from
Date
default=datetime.now().strftime('%Y-%m-01')
required=True
date_to
Date
default=<expr>
required=True
print_report(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)get_details_by_rule_category(self, payslip_lines)
get_lines_by_contribution_register(self, payslip_lines)
allow_cancel_payslips
Boolean
config_parameter='payroll.allow_cancel_payslips'
help='Allow users to cancel confirmed payslips.'
string='Allow canceling confirmed payslips'
allow_edit_payslip_lines
Boolean
config_parameter='payroll.allow_edit_payslip_lines'
default=False
help='Allow users to edit some payslip line fields manually'
string='Allow editing payslip lines'
leaves_positive
Boolean
config_parameter='payroll.leaves_positive'
help='In payslip worked days, leave days/hours have positive values'
string='Leaves with positive values'
module_payroll_account
Boolean
string='Payroll Accounting'
prevent_compute_on_confirm
Boolean
config_parameter='payroll.prevent_compute_on_confirm'
default=True
help='Prevent payslips from being recomputed when confirming them'
string='Confirm payslips without recomputing'
require_code_and_category
Boolean
config_parameter='payroll.require_code_and_category'
default=False
help='Require rule.code, rule.category, category.code, structure.code'
string='Require code/category on rules, categories and structures'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/payroll |
| GIT | |
| GIT | https://github.com/OCA/payroll.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/payroll/tree/15.0/payroll |
| VERSION | |
| VERSION | 1.4.0 |
| CATEGORY | |
| CATEGORY | Payroll |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | Yes |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Odoo SA |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Odoo SA |
| COMMITTERS | |
| COMMITTERS | Kevin Baptiste, Víctor Martínez, AaronHForgeFlow, Weblate, OCA-git-bot, oca-ci, Michael Telahun, nicolasrsande, kasparas |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/payroll |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:46:39 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - hr_contract - hr - base_setup - base - web - bus - web_tour - resource - hr_holidays - calendar |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_contract_view_form |
hr.contract.view.form.payroll | hr.contract | xpath | Inherits hr_contract.hr_contract_view_form |
hr_contribution_register_view_form |
hr.contribution.register.form | hr.contribution.register | form | New |
hr_contribution_register_view_kanban |
hr.contribution.register.kanban | hr.contribution.register | kanban | New |
hr_contribution_register_view_search |
hr.contribution.register.search | hr.contribution.register | search | New |
hr_contribution_register_view_tree |
hr.contribution.register.tree | hr.contribution.register | tree | New |
hr_employee_view_form |
hr.employee.view.form.payroll | hr.employee | xpath | Inherits hr.view_employee_form |
hr_leave_type_view_form |
hr.leave.type.view.form.payroll | hr.leave.type | xpath | Inherits hr_holidays.edit_holiday_status_form |
hr_payroll_structure_view_form |
hr.payroll.structure.form | hr.payroll.structure | form | New |
hr_payroll_structure_view_kanban |
hr.payroll.structure.kanban | hr.payroll.structure | kanban | New |
hr_payroll_structure_view_search |
hr.payroll.structure.select | hr.payroll.structure | search | New |
hr_payroll_structure_view_tree |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payroll_structure_view_tree_children |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payslip_change_state_form |
hr.payslip.change.state.form | hr.payslip.change.state | form | New |
hr_payslip_line_view_form |
hr.payslip.line.form | hr.payslip.line | form | New |
hr_payslip_line_view_pivot |
hr.payslip.line.pivot | hr.payslip.line | pivot | New |
hr_payslip_line_view_search |
hr.payslip.line.select | hr.payslip.line | search | New |
hr_payslip_line_view_tree |
hr.payslip.line.tree | hr.payslip.line | tree | New |
hr_payslip_run_view_form |
hr.payslip.run.form | hr.payslip.run | form | New |
hr_payslip_run_view_kanban |
hr.payslip.run.kanban | hr.payslip.run | kanban | New |
hr_payslip_run_view_search |
hr.payslip.run.search | hr.payslip.run | search | New |
hr_payslip_run_view_tree |
hr.payslip.run.tree | hr.payslip.run | tree | New |
hr_payslip_view_form |
hr.payslip.form | hr.payslip | form | New |
hr_payslip_view_kanban |
hr.payslip.kanban | hr.payslip | kanban | New |
hr_payslip_view_search |
hr.payslip.select | hr.payslip | search | New |
hr_payslip_view_tree |
hr.payslip.tree | hr.payslip | tree | New |
hr_salary_rule_category_view_form |
hr.salary.rule.category.form | hr.salary.rule.category | form | New |
hr_salary_rule_category_view_search |
hr.salary.rule.category.select | hr.salary.rule.category | search | New |
hr_salary_rule_category_view_tree |
hr.salary.rule.category.tree | hr.salary.rule.category | tree | New |
hr_salary_rule_view_form |
hr.salary.rule.form | hr.salary.rule | form | New |
hr_salary_rule_view_kanban |
hr.salary.rule.kanban | hr.salary.rule | kanban | New |
hr_salary_rule_view_search |
hr.salary.rule.select | hr.salary.rule | search | New |
hr_salary_rule_view_tree |
hr.salary.rule.tree | hr.salary.rule | tree | New |
hr_salary_rule_view_tree_children |
hr.salary.rule.list | hr.salary.rule | tree | New |
report_contributionregister |
report_contributionregister | ir.ui.view | qweb | New |
report_payslip |
report_payslip | ir.ui.view | qweb | New |
report_payslipdetails |
report_payslipdetails | ir.ui.view | qweb | New |
res_config_settings_view_form |
res.config.settings.view.form.inherit.hr.payroll | res.config.settings | xpath | Inherits base.res_config_settings_view_form |
view_hr_payslip_by_employees |
payroll_payslip_employees | hr.payslip.employees | form | New |
view_payslip_lines_contribution_register |
payslip.lines.contribution.register | payslip.lines.contribution.register | form | New |
resource_calendar_id
Many2one
help="Employee's working schedule."
required=True
schedule_pay
Selection
default='monthly'
help='Defines the frequency of the wage payment.'
index=True
string='Scheduled Pay'
args: [('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semi-annually', 'Semi-annually'), ('annually', 'Annually'), ('weekly', 'Weekly'), ('bi-weekly', 'Bi-weekly'), ('bi-monthly', 'Bi-monthly')]
struct_id
Many2one → hr.payroll.structure
string='Salary Structure'
args: 'hr.payroll.structure'
get_all_structures(self)
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
partner_id
Many2one → res.partner
string='Partner'
args: 'res.partner'
register_line_ids
One2many → hr.payslip.line
readonly=True
string='Register Line'
args: 'hr.payslip.line', 'register_id'
No public methods.
payslip_count
Integer
compute='_compute_payslip_count'
groups='payroll.group_payroll_user'
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'employee_id'
No public methods.
code
Char
string='Payroll Code'
No public methods.
children_ids
One2many → hr.payroll.structure
copy=True
string='Children'
args: 'hr.payroll.structure', 'parent_id'
code
Char
string='Reference'
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
parent_id
Many2one → hr.payroll.structure
default=_get_parent
string='Parent'
args: 'hr.payroll.structure'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
rule_ids
Many2many → hr.salary.rule
string='Salary Rules'
args: 'hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id'
copy(self, default=None)
get_all_rules(self)
allow_cancel_payslips
Boolean
compute='_compute_allow_cancel_payslips'
args: 'Allow Canceling Payslips'
company_id
Many2one → res.company
copy=False
default=<expr>
readonly=True
states={'draft': [('readonly', False)]}
string='Company'
args: 'res.company'
compute_date
Date
contract_id
Many2one → hr.contract
readonly=True
states={'draft': [('readonly', False)]}
string='Contract'
tracking=True
args: 'hr.contract'
credit_note
Boolean
help='Indicates this payslip has a refund of another'
readonly=True
states={'draft': [('readonly', False)]}
date_from
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
tracking=True
date_to
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
tracking=True
dynamic_filtered_payslip_lines
One2many → hr.payslip.line
compute='_compute_dynamic_filtered_payslip_lines'
args: 'hr.payslip.line'
employee_id
Many2one → hr.employee
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Employee'
args: 'hr.employee'
hide_child_lines
Boolean
default=False
hide_invisible_lines
Boolean
default=False
string='Show only lines that appear on payslip'
input_line_ids
One2many → hr.payslip.input
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Inputs'
args: 'hr.payslip.input', 'payslip_id'
line_ids
One2many → hr.payslip.line
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Lines'
args: 'hr.payslip.line', 'slip_id'
name
Char
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Name'
note
Text
readonly=True
states={'draft': [('readonly', False)]}
string='Internal Note'
tracking=True
number
Char
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Reference'
paid
Boolean
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Made Payment Order ? '
payslip_count
Integer
compute='_compute_payslip_count'
string='Payslip Computation Details'
payslip_run_id
Many2one → hr.payslip.run
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Batches'
tracking=True
args: 'hr.payslip.run'
prevent_compute_on_confirm
Boolean
compute='_compute_prevent_compute_on_confirm'
args: 'Prevent Compute on Confirm'
refunded_id
Many2one → hr.payslip
readonly=True
string='Refunded Payslip'
args: 'hr.payslip'
state
Selection
copy=False
default='draft'
help="* When the payslip is created the status is 'Draft'\n \n* If the payslip is under verification, the status is 'Waiting'.\n \n* If the payslip is confirmed then status is set to 'Done'.\n \n* When user cancel payslip the status is 'Rejected'."
index=True
readonly=True
string='Status'
tracking=True
args: [('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
states={'draft': [('readonly', False)]}
string='Structure'
args: 'hr.payroll.structure'
worked_days_line_ids
One2many → hr.payslip.worked_days
copy=True
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Worked Days'
args: 'hr.payslip.worked_days', 'payslip_id'
action_payslip_cancel(self)
action_payslip_done(self)
action_payslip_draft(self)
compute_sheet(self)
copy(self, default=None)
get_current_contract_dict(self, contract, contracts)
get_inputs(self, contracts, date_from, date_to)
get_lines_dict(self)
get_payroll_dict(self, contracts)
get_payslip_vals(self, date_from, date_to, employee_id=False, contract_id=False, struct_id=False)
get_salary_line_total(self, code)
get_worked_day_lines(self, contracts, date_from, date_to)
localdict_hook(self, localdict)
onchange_contract(self)
onchange_dates(self)
onchange_employee(self)
onchange_struct_id(self)
refund_sheet(self)
unlink(self)
state
Selection
help="* When the payslip is created the status is 'Draft'. \n* If the payslip is under verification, the status is 'Compute Sheet'. \n* If the payslip is confirmed then status is set to 'Done'. \n* When user cancel payslip the status is 'Rejected'."
selection=[('draft', 'Set to Draft'), ('verify', 'Compute Sheet'), ('done', 'Confirm'), ('cancel', 'Cancel Payslip')]
string='Action'
change_state_confirm(self)
employee_ids
Many2many → hr.employee
compute_sheet(self)
amount
Float
help='It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01.'
amount_qty
Float
help='It can be used in computation for other inputs'
args: 'Amount Quantity'
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
allow_edit_payslip_lines
Boolean
compute='_compute_allow_edit_payslip_lines'
args: 'Allow editing'
amount
Float
digits='Payroll'
child_ids
One2many → hr.payslip.line
string='Child Payslip Lines'
args: 'hr.payslip.line', 'parent_line_id'
contract_id
Many2one → hr.contract
index=True
required=True
string='Contract'
args: 'hr.contract'
date_from
Date
related='slip_id.date_from'
store=True
args: 'Date From'
employee_id
Many2one → hr.employee
required=True
string='Employee'
args: 'hr.employee'
parent_line_id
Many2one → hr.payslip.line
compute='_compute_parent_line_id'
store=True
string='Parent Payslip Line'
args: 'hr.payslip.line'
payslip_run_id
Many2one → hr.payslip.run
related='slip_id.payslip_run_id'
string='Payslip Batch'
args: 'hr.payslip.run'
quantity
Float
default=1.0
digits='Payroll'
rate
Float
default=100.0
digits='Payroll Rate'
string='Rate (%)'
salary_rule_id
Many2one → hr.salary.rule
required=True
string='Rule'
args: 'hr.salary.rule'
slip_id
Many2one → hr.payslip
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
total
Float
compute='_compute_total'
digits='Payroll'
store=True
create(self, vals_list)
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
credit_note
Boolean
help='If its checked, indicates that all payslips generated from here are refund payslips.'
readonly=True
states={'draft': [('readonly', False)]}
date_end
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date To'
date_start
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date From'
name
Char
readonly=True
required=True
states={'draft': [('readonly', False)]}
slip_ids
One2many → hr.payslip
readonly=True
states={'draft': [('readonly', False)]}
string='Payslips'
args: 'hr.payslip', 'payslip_run_id'
state
Selection
copy=False
default='draft'
index=True
readonly=True
string='Status'
tracking=1
args: [('draft', 'Draft'), ('close', 'Close')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip batch, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
states={'draft': [('readonly', False)]}
string='Structure'
args: 'hr.payroll.structure'
close_payslip_run(self)
draft_payslip_run(self)
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
number_of_days
Float
string='Number of Days'
number_of_hours
Float
string='Number of Hours'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
code
Char
help='The code that can be used in the salary rules'
required=True
input_id
Many2one → hr.salary.rule
required=True
string='Salary Rule Input'
args: 'hr.salary.rule'
name
Char
required=True
string='Description'
No public methods.
active
Boolean
default=True
help='If the active field is set to false, it will allow you to hide the salary rule without removing it.'
amount_fix
Float
digits='Payroll'
string='Fixed Amount'
amount_percentage
Float
digits='Payroll Rate'
help='For example, enter 50.0 to apply a percentage of 50%'
string='Percentage (%)'
amount_percentage_base
Char
help='result will be affected to a variable'
string='Percentage based on'
amount_python_compute
Text
default='\n # Available variables:\n #-------------------------------\n # payslip: hr.payslip object\n # payslips: object containing payslips (browsable)\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n # payroll: object containing miscellaneous values related to payroll\n # current_contract: object with values calculated from the current contract\n # result_rules: object with a dict of qty, rate, amount an total of calculated rules\n # tools: object that contain libraries and tools that can be used in calculations\n\n # Available compute variables:\n #-------------------------------\n # result: returned value have to be set in the variable \'result\'\n # result_rate: the rate that will be applied to "result".\n # result_qty: the quantity of units that will be multiplied to "result".\n # result_name: if this variable is computed, it will contain the name of the line.\n\n # Example:\n #-------------------------------\n # result = contract.wage * 0.10\n\n '
string='Python Code'
amount_select
Selection
default='fix'
help='The computation method for the rule amount.'
index=True
required=True
string='Amount Type'
args: [('percentage', 'Percentage (%)'), ('fix', 'Fixed Amount'), ('code', 'Python Code')]
appears_on_payslip
Boolean
default=True
help='Used to display the salary rule on payslip.'
string='Appears on Payslip'
category_id
Many2one → hr.salary.rule.category
string='Category'
args: 'hr.salary.rule.category'
child_ids
One2many → hr.salary.rule
copy=True
string='Child Salary Rule'
args: 'hr.salary.rule', 'parent_rule_id'
code
Char
help='The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive.'
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
condition_python
Text
default="\n # Available variables:\n #-------------------------------\n # payslip: hr.payslip object\n # payslips: object containing payslips (browsable)\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n # payroll: object containing miscellaneous values related to payroll\n # current_contract: object with values calculated from the current contract\n # result_rules: object with a dict of qty, rate, amount an total of calculated rules\n # tools: object that contain libraries and tools that can be used in calculations\n\n # Available compute variables:\n #-------------------------------\n # result: returned value have to be set in the variable 'result'\n\n # Example:\n #-------------------------------\n # result = worked_days.WORK0 and worked_days.WORK0.number_of_days > 0\n\n "
help='Applied this rule for calculation if condition is true. You can specify condition like basic > 1000.'
required=True
string='Python Condition'
condition_range
Char
default='contract.wage'
help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'
string='Range Based on'
condition_range_max
Float
help='The maximum amount, applied for this rule.'
string='Maximum Range'
condition_range_min
Float
help='The minimum amount, applied for this rule.'
string='Minimum Range'
condition_select
Selection
default='none'
required=True
string='Condition Based on'
args: [('none', 'Always True'), ('range', 'Range'), ('python', 'Python Expression')]
input_ids
One2many → hr.rule.input
copy=True
string='Inputs'
args: 'hr.rule.input', 'input_id'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_rule_id
Many2one → hr.salary.rule
index=True
string='Parent Salary Rule'
args: 'hr.salary.rule'
quantity
Char
default='1.0'
help='It is used in computation for percentage and fixed amount. For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days.'
register_id
Many2one → hr.contribution.register
help='Eventual third party involved in the salary payment of the employees.'
string='Contribution Register'
args: 'hr.contribution.register'
require_code_and_category
Boolean
compute='_compute_require_code_and_category'
default=<expr>
args: 'Require code and category'
sequence
Integer
default=5
help='Use to arrange calculation sequence'
index=True
required=True
No public methods.
children_ids
One2many → hr.salary.rule.category
string='Children'
args: 'hr.salary.rule.category', 'parent_id'
code
Char
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_id
Many2one → hr.salary.rule.category
help='Linking a salary category to its parent is used only for the reporting purpose.'
string='Parent'
args: 'hr.salary.rule.category'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
salary_rules_ids
One2many → hr.salary.rule
string='Salary Rule Categories'
args: 'hr.salary.rule', 'category_id'
No public methods.
date_from
Date
default=datetime.now().strftime('%Y-%m-01')
required=True
date_to
Date
default=<expr>
required=True
print_report(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)get_details_by_rule_category(self, payslip_lines)
get_lines_by_contribution_register(self, payslip_lines)
allow_cancel_payslips
Boolean
config_parameter='payroll.allow_cancel_payslips'
help='Allow users to cancel confirmed payslips.'
string='Allow canceling confirmed payslips'
allow_edit_payslip_lines
Boolean
config_parameter='payroll.allow_edit_payslip_lines'
default=False
help='Allow users to edit some payslip line fields manually'
string='Allow editing payslip lines'
leaves_positive
Boolean
config_parameter='payroll.leaves_positive'
help='In payslip worked days, leave days/hours have positive values'
string='Leaves with positive values'
module_payroll_account
Boolean
string='Payroll Accounting'
prevent_compute_on_confirm
Boolean
config_parameter='payroll.prevent_compute_on_confirm'
default=True
help='Prevent payslips from being recomputed when confirming them'
string='Confirm payslips without recomputing'
require_code_and_category
Boolean
config_parameter='payroll.require_code_and_category'
default=False
help='Require rule.code, rule.category, category.code, structure.code'
string='Require code/category on rules, categories and structures'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/payroll |
| GIT | |
| GIT | https://github.com/OCA/payroll.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/payroll/tree/14.0/payroll |
| VERSION | |
| VERSION | 6.2.4 |
| CATEGORY | |
| CATEGORY | Payroll |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | Yes |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Odoo SA |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Odoo SA |
| COMMITTERS | |
| COMMITTERS | OCA Transbot, oca-travis, Weblate, OCA-git-bot, oca-ci, Alessandro Uffreduzzi, oca-git-bot, Juany Davila, Michael Telahun, nicolasrsande, Henrik Norlin, FernandoRomera, Hilar AK |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/payroll |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:41:07 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - hr_contract - hr - base_setup - base - web - bus - web_tour - resource - hr_holidays - calendar |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_contract_view_form |
hr.contract.view.form.payroll | hr.contract | xpath | Inherits hr_contract.hr_contract_view_form |
hr_contribution_register_view_form |
hr.contribution.register.form | hr.contribution.register | form | New |
hr_contribution_register_view_kanban |
hr.contribution.register.kanban | hr.contribution.register | kanban | New |
hr_contribution_register_view_search |
hr.contribution.register.search | hr.contribution.register | search | New |
hr_contribution_register_view_tree |
hr.contribution.register.tree | hr.contribution.register | tree | New |
hr_employee_view_form |
hr.employee.view.form.payroll | hr.employee | xpath | Inherits hr.view_employee_form |
hr_payroll_structure_view_form |
hr.payroll.structure.form | hr.payroll.structure | form | New |
hr_payroll_structure_view_kanban |
hr.payroll.structure.kanban | hr.payroll.structure | kanban | New |
hr_payroll_structure_view_search |
hr.payroll.structure.select | hr.payroll.structure | search | New |
hr_payroll_structure_view_tree |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payroll_structure_view_tree_children |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payslip_change_state_form |
hr.payslip.change.state.form | hr.payslip.change.state | form | New |
hr_payslip_line_view_form |
hr.payslip.line.form | hr.payslip.line | form | New |
hr_payslip_line_view_pivot |
hr.payslip.line.pivot | hr.payslip.line | pivot | New |
hr_payslip_line_view_search |
hr.payslip.line.select | hr.payslip.line | search | New |
hr_payslip_line_view_tree |
hr.payslip.line.tree | hr.payslip.line | tree | New |
hr_payslip_run_view_form |
hr.payslip.run.form | hr.payslip.run | form | New |
hr_payslip_run_view_kanban |
hr.payslip.run.kanban | hr.payslip.run | kanban | New |
hr_payslip_run_view_search |
hr.payslip.run.search | hr.payslip.run | search | New |
hr_payslip_run_view_tree |
hr.payslip.run.tree | hr.payslip.run | tree | New |
hr_payslip_view_form |
hr.payslip.form | hr.payslip | form | New |
hr_payslip_view_kanban |
hr.payslip.kanban | hr.payslip | kanban | New |
hr_payslip_view_search |
hr.payslip.select | hr.payslip | search | New |
hr_payslip_view_tree |
hr.payslip.tree | hr.payslip | tree | New |
hr_salary_rule_category_view_form |
hr.salary.rule.category.form | hr.salary.rule.category | form | New |
hr_salary_rule_category_view_search |
hr.salary.rule.category.select | hr.salary.rule.category | search | New |
hr_salary_rule_category_view_tree |
hr.salary.rule.category.tree | hr.salary.rule.category | tree | New |
hr_salary_rule_view_form |
hr.salary.rule.form | hr.salary.rule | form | New |
hr_salary_rule_view_kanban |
hr.salary.rule.kanban | hr.salary.rule | kanban | New |
hr_salary_rule_view_search |
hr.salary.rule.select | hr.salary.rule | search | New |
hr_salary_rule_view_tree |
hr.salary.rule.tree | hr.salary.rule | tree | New |
hr_salary_rule_view_tree_children |
hr.salary.rule.list | hr.salary.rule | tree | New |
report_contributionregister |
report_contributionregister | ir.ui.view | qweb | New |
report_payslip |
report_payslip | ir.ui.view | qweb | New |
report_payslipdetails |
report_payslipdetails | ir.ui.view | qweb | New |
res_config_settings_view_form |
res.config.settings.view.form.inherit.hr.payroll | res.config.settings | xpath | Inherits base.res_config_settings_view_form |
view_hr_payslip_by_employees |
payroll_payslip_employees | hr.payslip.employees | form | New |
view_payslip_lines_contribution_register |
payslip.lines.contribution.register | payslip.lines.contribution.register | form | New |
resource_calendar_id
Many2one
help="Employee's working schedule."
required=True
schedule_pay
Selection
default='monthly'
help='Defines the frequency of the wage payment.'
index=True
string='Scheduled Pay'
args: [('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semi-annually', 'Semi-annually'), ('annually', 'Annually'), ('weekly', 'Weekly'), ('bi-weekly', 'Bi-weekly'), ('bi-monthly', 'Bi-monthly')]
struct_id
Many2one → hr.payroll.structure
string='Salary Structure'
args: 'hr.payroll.structure'
get_all_structures(self)
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
partner_id
Many2one → res.partner
string='Partner'
args: 'res.partner'
register_line_ids
One2many → hr.payslip.line
readonly=True
string='Register Line'
args: 'hr.payslip.line', 'register_id'
No public methods.
payslip_count
Integer
compute='_compute_payslip_count'
groups='payroll.group_payroll_user'
string='Payslip Count'
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'employee_id'
No public methods.
children_ids
One2many → hr.payroll.structure
copy=True
string='Children'
args: 'hr.payroll.structure', 'parent_id'
code
Char
string='Reference'
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
parent_id
Many2one → hr.payroll.structure
default=_get_parent
string='Parent'
args: 'hr.payroll.structure'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
rule_ids
Many2many → hr.salary.rule
string='Salary Rules'
args: 'hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id'
copy(self, default=None)
get_all_rules(self)
allow_cancel_payslips
Boolean
compute='_compute_allow_cancel_payslips'
args: 'Allow Canceling Payslips'
company_id
Many2one → res.company
copy=False
default=<expr>
readonly=True
states={'draft': [('readonly', False)]}
string='Company'
args: 'res.company'
compute_date
Date
contract_id
Many2one → hr.contract
readonly=True
states={'draft': [('readonly', False)]}
string='Contract'
tracking=True
args: 'hr.contract'
credit_note
Boolean
help='Indicates this payslip has a refund of another'
readonly=True
states={'draft': [('readonly', False)]}
string='Credit Note'
date_from
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date From'
tracking=True
date_to
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date To'
tracking=True
dynamic_filtered_payslip_lines
One2many → hr.payslip.line
compute='_compute_dynamic_filtered_payslip_lines'
string='Dynamic Filtered Payslip Lines'
args: 'hr.payslip.line'
employee_id
Many2one → hr.employee
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Employee'
args: 'hr.employee'
hide_child_lines
Boolean
default=False
string='Hide Child Lines'
hide_invisible_lines
Boolean
default=False
string='Show only lines that appear on payslip'
input_line_ids
One2many → hr.payslip.input
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Inputs'
args: 'hr.payslip.input', 'payslip_id'
line_ids
One2many → hr.payslip.line
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Lines'
args: 'hr.payslip.line', 'slip_id'
name
Char
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Name'
note
Text
readonly=True
states={'draft': [('readonly', False)]}
string='Internal Note'
tracking=True
number
Char
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Reference'
paid
Boolean
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Made Payment Order ? '
payslip_count
Integer
compute='_compute_payslip_count'
string='Payslip Computation Details'
payslip_run_id
Many2one → hr.payslip.run
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Batches'
tracking=True
args: 'hr.payslip.run'
prevent_compute_on_confirm
Boolean
compute='_compute_prevent_compute_on_confirm'
args: 'Prevent Compute on Confirm'
refunded_id
Many2one → hr.payslip
readonly=True
string='Refunded Payslip'
args: 'hr.payslip'
state
Selection
copy=False
default='draft'
help="* When the payslip is created the status is 'Draft'\n \n* If the payslip is under verification, the status is 'Waiting'.\n \n* If the payslip is confirmed then status is set to 'Done'.\n \n* When user cancel payslip the status is 'Rejected'."
index=True
readonly=True
string='Status'
tracking=True
args: [('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
states={'draft': [('readonly', False)]}
string='Structure'
args: 'hr.payroll.structure'
worked_days_line_ids
One2many → hr.payslip.worked_days
copy=True
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Worked Days'
args: 'hr.payslip.worked_days', 'payslip_id'
action_payslip_cancel(self)
action_payslip_done(self)
action_payslip_draft(self)
compute_sheet(self)
copy(self, default=None)
get_current_contract_dict(self, contract, contracts)
get_inputs(self, contracts, date_from, date_to)
get_lines_dict(self)
get_payroll_dict(self, contracts)
get_payslip_vals(self, date_from, date_to, employee_id=False, contract_id=False, struct_id=False)
get_salary_line_total(self, code)
get_worked_day_lines(self, contracts, date_from, date_to)
line_sum_where(self, field_name, value, rules, result_rules)
localdict_hook(self, localdict)
onchange_contract(self)
onchange_dates(self)
onchange_employee(self)
onchange_struct_id(self)
refund_sheet(self)
unlink(self)
state
Selection
help="* When the payslip is created the status is 'Draft'. \n* If the payslip is under verification, the status is 'Compute Sheet'. \n* If the payslip is confirmed then status is set to 'Done'. \n* When user cancel payslip the status is 'Rejected'."
selection=[('draft', 'Set to Draft'), ('verify', 'Compute Sheet'), ('done', 'Confirm'), ('cancel', 'Cancel Payslip')]
string='Action'
change_state_confirm(self)
employee_ids
Many2many → hr.employee
compute_sheet(self)
amount
Float
help='It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01.'
amount_qty
Float
help='It can be used in computation for other inputs'
args: 'Amount Quantity'
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
allow_edit_payslip_lines
Boolean
compute='_compute_allow_edit_payslip_lines'
args: 'Allow editing'
amount
Float
digits='Payroll'
child_ids
One2many → hr.payslip.line
string='Child Payslip Lines'
args: 'hr.payslip.line', 'parent_line_id'
contract_id
Many2one → hr.contract
index=True
required=True
string='Contract'
args: 'hr.contract'
date_from
Date
related='slip_id.date_from'
store=True
args: 'Date From'
employee_id
Many2one → hr.employee
required=True
string='Employee'
args: 'hr.employee'
parent_line_id
Many2one → hr.payslip.line
compute='_compute_parent_line_id'
store=True
string='Parent Payslip Line'
args: 'hr.payslip.line'
payslip_run_id
Many2one → hr.payslip.run
related='slip_id.payslip_run_id'
string='Payslip Batch'
args: 'hr.payslip.run'
quantity
Float
default=1.0
digits='Payroll'
rate
Float
default=100.0
digits='Payroll Rate'
string='Rate (%)'
salary_rule_id
Many2one → hr.salary.rule
required=True
string='Rule'
args: 'hr.salary.rule'
slip_id
Many2one → hr.payslip
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
total
Float
compute='_compute_total'
digits='Payroll'
store=True
string='Total'
create(self, vals_list)
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
credit_note
Boolean
help='If its checked, indicates that all payslips generated from here are refund payslips.'
readonly=True
states={'draft': [('readonly', False)]}
string='Credit Note'
date_end
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date To'
date_start
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date From'
name
Char
readonly=True
required=True
states={'draft': [('readonly', False)]}
slip_ids
One2many → hr.payslip
readonly=True
states={'draft': [('readonly', False)]}
string='Payslips'
args: 'hr.payslip', 'payslip_run_id'
state
Selection
copy=False
default='draft'
index=True
readonly=True
string='Status'
tracking=1
args: [('draft', 'Draft'), ('close', 'Close')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip batch, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
states={'draft': [('readonly', False)]}
string='Structure'
args: 'hr.payroll.structure'
close_payslip_run(self)
draft_payslip_run(self)
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
number_of_days
Float
string='Number of Days'
number_of_hours
Float
string='Number of Hours'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
code
Char
help='The code that can be used in the salary rules'
required=True
input_id
Many2one → hr.salary.rule
required=True
string='Salary Rule Input'
args: 'hr.salary.rule'
name
Char
required=True
string='Description'
No public methods.
active
Boolean
default=True
help='If the active field is set to false, it will allow you to hide the salary rule without removing it.'
amount_fix
Float
digits='Payroll'
string='Fixed Amount'
amount_percentage
Float
digits='Payroll Rate'
help='For example, enter 50.0 to apply a percentage of 50%'
string='Percentage (%)'
amount_percentage_base
Char
help='result will be affected to a variable'
string='Percentage based on'
amount_python_compute
Text
default='\n # Available variables:\n #-------------------------------\n # payslip: hr.payslip object\n # payslips: object containing payslips (browsable)\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n # payroll: object containing miscellaneous values related to payroll\n # current_contract: object with values calculated from the current contract\n # result_rules: object with a dict of qty, rate, amount an total of calculated rules\n # tools: object that contain libraries and tools that can be used in calculations\n\n # Available compute variables:\n #-------------------------------\n # result: returned value have to be set in the variable \'result\'\n # result_rate: the rate that will be applied to "result".\n # result_qty: the quantity of units that will be multiplied to "result".\n # result_name: if this variable is computed, it will contain the name of the line.\n\n # Example:\n #-------------------------------\n # result = contract.wage * 0.10\n\n '
string='Python Code'
amount_select
Selection
default='fix'
help='The computation method for the rule amount.'
index=True
required=True
string='Amount Type'
args: [('percentage', 'Percentage (%)'), ('fix', 'Fixed Amount'), ('code', 'Python Code')]
appears_on_payslip
Boolean
default=True
help='Used to display the salary rule on payslip.'
string='Appears on Payslip'
category_id
Many2one → hr.salary.rule.category
string='Category'
args: 'hr.salary.rule.category'
child_ids
One2many → hr.salary.rule
copy=True
string='Child Salary Rule'
args: 'hr.salary.rule', 'parent_rule_id'
code
Char
help='The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive.'
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
condition_python
Text
default="\n # Available variables:\n #-------------------------------\n # payslip: hr.payslip object\n # payslips: object containing payslips (browsable)\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n # payroll: object containing miscellaneous values related to payroll\n # current_contract: object with values calculated from the current contract\n # result_rules: object with a dict of qty, rate, amount an total of calculated rules\n # tools: object that contain libraries and tools that can be used in calculations\n\n # Available compute variables:\n #-------------------------------\n # result: returned value have to be set in the variable 'result'\n\n # Example:\n #-------------------------------\n # result = worked_days.WORK0 and worked_days.WORK0.number_of_days > 0\n\n "
help='Applied this rule for calculation if condition is true. You can specify condition like basic > 1000.'
required=True
string='Python Condition'
condition_range
Char
default='contract.wage'
help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'
string='Range Based on'
condition_range_max
Float
help='The maximum amount, applied for this rule.'
string='Maximum Range'
condition_range_min
Float
help='The minimum amount, applied for this rule.'
string='Minimum Range'
condition_select
Selection
default='none'
required=True
string='Condition Based on'
args: [('none', 'Always True'), ('range', 'Range'), ('python', 'Python Expression')]
input_ids
One2many → hr.rule.input
copy=True
string='Inputs'
args: 'hr.rule.input', 'input_id'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_rule_id
Many2one → hr.salary.rule
index=True
string='Parent Salary Rule'
args: 'hr.salary.rule'
quantity
Char
default='1.0'
help='It is used in computation for percentage and fixed amount. For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days.'
register_id
Many2one → hr.contribution.register
help='Eventual third party involved in the salary payment of the employees.'
string='Contribution Register'
args: 'hr.contribution.register'
require_code_and_category
Boolean
compute='_compute_require_code_and_category'
default=<expr>
args: 'Require code and category'
sequence
Integer
default=5
help='Use to arrange calculation sequence'
index=True
required=True
No public methods.
children_ids
One2many → hr.salary.rule.category
string='Children'
args: 'hr.salary.rule.category', 'parent_id'
code
Char
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_id
Many2one → hr.salary.rule.category
help='Linking a salary category to its parent is used only for the reporting purpose.'
string='Parent'
args: 'hr.salary.rule.category'
require_code
Boolean
compute='_compute_require_code'
default=<expr>
args: 'Require code'
salary_rules_ids
One2many → hr.salary.rule
string='Salary Rule Categories'
args: 'hr.salary.rule', 'category_id'
No public methods.
date_from
Date
default=datetime.now().strftime('%Y-%m-01')
required=True
string='Date From'
date_to
Date
default=<expr>
required=True
string='Date To'
print_report(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)get_details_by_rule_category(self, payslip_lines)
get_lines_by_contribution_register(self, payslip_lines)
allow_cancel_payslips
Boolean
config_parameter='payroll.allow_cancel_payslips'
help='Allow users to cancel confirmed payslips.'
string='Allow canceling confirmed payslips'
allow_edit_payslip_lines
Boolean
config_parameter='payroll.allow_edit_payslip_lines'
default=False
help='Allow users to edit some payslip line fields manually'
string='Allow editing payslip lines'
leaves_positive
Boolean
config_parameter='payroll.leaves_positive'
help='In payslip worked days, leave days/hours have positive values'
string='Leaves with positive values'
module_payroll_account
Boolean
string='Payroll Accounting'
prevent_compute_on_confirm
Boolean
config_parameter='payroll.prevent_compute_on_confirm'
default=True
help='Prevent payslips from being recomputed when confirming them'
string='Confirm payslips without recomputing'
require_code_and_category
Boolean
config_parameter='payroll.require_code_and_category'
default=False
help='Require rule.code, rule.category, category.code, structure.code'
string='Require code/category on rules, categories and structures'
No public methods.
| REPOSITORY | |
|---|---|
| REPOSITORY | OCA/payroll |
| GIT | |
| GIT | https://github.com/OCA/payroll.git |
| GIT FOLDER | |
| GIT FOLDER | https://github.com/OCA/payroll/tree/13.0/payroll |
| VERSION | |
| VERSION | 1.0.2 |
| CATEGORY | |
| CATEGORY | Human Resources |
| LICENSE | |
| LICENSE | LGPL-3 |
| APPLICATION | |
| APPLICATION | Yes |
| AUTO-INSTALLABLE | |
| AUTO-INSTALLABLE | No |
| AUTHORS | |
| AUTHORS | Odoo Community Association (OCA), Odoo SA |
| MAINTAINERS | |
| MAINTAINERS | Odoo Community Association (OCA), Odoo SA |
| COMMITTERS | |
| COMMITTERS | GitHub, OCA Transbot, Miquel Raïch, Víctor Martínez, oca-travis, Weblate, OCA-git-bot, Malay Khamar, David James |
| WEBSITE | |
| WEBSITE | https://github.com/OCA/payroll |
| LAST TRACKING UPDATE | |
| LAST TRACKING UPDATE | 2026-07-06 00:34:17 |
| ODOO DEPENDENCIES | |
| ODOO DEPENDENCIES |
odoo/odoo: - hr_contract - hr - base_setup - base - web - bus - web_tour - resource - mail_bot - hr_holidays - calendar |
| PYTHON DEPENDENCIES | |
| PYTHON DEPENDENCIES | Not have |
| SYSTEM DEPENDENCIES | |
| SYSTEM DEPENDENCIES | Not have |
| DESCRIPTION | |
| DESCRIPTION | |
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_contract_advantage_template_view_form |
hr.contract.advantage.template.form | hr.contract.advantage.template | form | New |
hr_contract_advantage_template_view_tree |
hr.contract.advantage.template.tree | hr.contract.advantage.template | tree | New |
hr_contract_view_form |
hr.contract.view.form.payroll | hr.contract | xpath | Inherits hr_contract.hr_contract_view_form |
hr_contribution_register_view_form |
hr.contribution.register.form | hr.contribution.register | form | New |
hr_contribution_register_view_kanban |
hr.contribution.register.kanban | hr.contribution.register | kanban | New |
hr_contribution_register_view_search |
hr.contribution.register.search | hr.contribution.register | search | New |
hr_contribution_register_view_tree |
hr.contribution.register.tree | hr.contribution.register | tree | New |
hr_employee_view_form |
hr.employee.view.form.payroll | hr.employee | xpath | Inherits hr.view_employee_form |
hr_payroll_structure_view_form |
hr.payroll.structure.form | hr.payroll.structure | form | New |
hr_payroll_structure_view_kanban |
hr.payroll.structure.kanban | hr.payroll.structure | kanban | New |
hr_payroll_structure_view_search |
hr.payroll.structure.select | hr.payroll.structure | search | New |
hr_payroll_structure_view_tree |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payroll_structure_view_tree_children |
hr.payroll.structure.tree | hr.payroll.structure | tree | New |
hr_payslip_line_view_form |
hr.payslip.line.form | hr.payslip.line | form | New |
hr_payslip_line_view_search |
hr.payslip.line.select | hr.payslip.line | search | New |
hr_payslip_line_view_tree |
hr.payslip.line.tree | hr.payslip.line | tree | New |
hr_payslip_run_view_form |
hr.payslip.run.form | hr.payslip.run | form | New |
hr_payslip_run_view_kanban |
hr.payslip.run.kanban | hr.payslip.run | kanban | New |
hr_payslip_run_view_search |
hr.payslip.run.search | hr.payslip.run | search | New |
hr_payslip_run_view_tree |
hr.payslip.run.tree | hr.payslip.run | tree | New |
hr_payslip_view_form |
hr.payslip.form | hr.payslip | form | New |
hr_payslip_view_kanban |
hr.payslip.kanban | hr.payslip | kanban | New |
hr_payslip_view_search |
hr.payslip.select | hr.payslip | search | New |
hr_payslip_view_tree |
hr.payslip.tree | hr.payslip | tree | New |
hr_salary_rule_category_view_form |
hr.salary.rule.category.form | hr.salary.rule.category | form | New |
hr_salary_rule_category_view_search |
hr.salary.rule.category.select | hr.salary.rule.category | search | New |
hr_salary_rule_category_view_tree |
hr.salary.rule.category.tree | hr.salary.rule.category | tree | New |
hr_salary_rule_view_form |
hr.salary.rule.form | hr.salary.rule | form | New |
hr_salary_rule_view_kanban |
hr.salary.rule.kanban | hr.salary.rule | kanban | New |
hr_salary_rule_view_search |
hr.salary.rule.select | hr.salary.rule | search | New |
hr_salary_rule_view_tree |
hr.salary.rule.tree | hr.salary.rule | tree | New |
hr_salary_rule_view_tree_children |
hr.salary.rule.list | hr.salary.rule | tree | New |
report_contributionregister |
report_contributionregister | ir.ui.view | qweb | New |
report_payslip |
report_payslip | ir.ui.view | qweb | New |
report_payslipdetails |
report_payslipdetails | ir.ui.view | qweb | New |
res_config_settings_view_form |
res.config.settings.view.form.inherit.hr.payroll | res.config.settings | xpath | Inherits base.res_config_settings_view_form |
view_hr_payslip_by_employees |
payroll_payslip_employees | hr.payslip.employees | form | New |
view_payslip_lines_contribution_register |
payslip.lines.contribution.register | payslip.lines.contribution.register | form | New |
resource_calendar_id
Many2one
help="Employee's working schedule."
required=True
schedule_pay
Selection
default='monthly'
help='Defines the frequency of the wage payment.'
index=True
string='Scheduled Pay'
args: [('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semi-annually', 'Semi-annually'), ('annually', 'Annually'), ('weekly', 'Weekly'), ('bi-weekly', 'Bi-weekly'), ('bi-monthly', 'Bi-monthly')]
struct_id
Many2one → hr.payroll.structure
string='Salary Structure'
args: 'hr.payroll.structure'
get_all_structures(self)
get_attribute(self, code, attribute)
set_attribute_value(self, code, active)
code
Char
required=True
args: 'Code'
default_value
Float
lower_bound
Float
help='Lower bound authorized by the employer for this advantage'
args: 'Lower Bound'
name
Char
required=True
args: 'Name'
upper_bound
Float
help='Upper bound authorized by the employer for this advantage'
args: 'Upper Bound'
No public methods.
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
partner_id
Many2one → res.partner
string='Partner'
args: 'res.partner'
register_line_ids
One2many → hr.payslip.line
readonly=True
string='Register Line'
args: 'hr.payslip.line', 'register_id'
No public methods.
payslip_count
Integer
compute='_compute_payslip_count'
groups='payroll.group_payroll_user'
string='Payslip Count'
slip_ids
One2many → hr.payslip
readonly=True
string='Payslips'
args: 'hr.payslip', 'employee_id'
No public methods.
children_ids
One2many → hr.payroll.structure
copy=True
string='Children'
args: 'hr.payroll.structure', 'parent_id'
code
Char
required=True
string='Reference'
company_id
Many2one → res.company
copy=False
default=<expr>
required=True
string='Company'
args: 'res.company'
name
Char
required=True
note
Text
string='Description'
parent_id
Many2one → hr.payroll.structure
default=_get_parent
string='Parent'
args: 'hr.payroll.structure'
rule_ids
Many2many → hr.salary.rule
string='Salary Rules'
args: 'hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id'
copy(self, default=None)
get_all_rules(self)
company_id
Many2one → res.company
copy=False
default=<expr>
readonly=True
states={'draft': [('readonly', False)]}
string='Company'
args: 'res.company'
contract_id
Many2one → hr.contract
readonly=True
states={'draft': [('readonly', False)]}
string='Contract'
args: 'hr.contract'
credit_note
Boolean
help='Indicates this payslip has a refund of another'
readonly=True
states={'draft': [('readonly', False)]}
string='Credit Note'
date_from
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date From'
date_to
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date To'
details_by_salary_rule_category
One2many → hr.payslip.line
compute='_compute_details_by_salary_rule_category'
string='Details by Salary Rule Category'
args: 'hr.payslip.line'
employee_id
Many2one → hr.employee
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Employee'
args: 'hr.employee'
input_line_ids
One2many → hr.payslip.input
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Inputs'
args: 'hr.payslip.input', 'payslip_id'
line_ids
One2many → hr.payslip.line
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Lines'
args: 'hr.payslip.line', 'slip_id'
name
Char
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Name'
note
Text
readonly=True
states={'draft': [('readonly', False)]}
string='Internal Note'
number
Char
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Reference'
paid
Boolean
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Made Payment Order ? '
payslip_count
Integer
compute='_compute_payslip_count'
string='Payslip Computation Details'
payslip_run_id
Many2one → hr.payslip.run
copy=False
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Batches'
args: 'hr.payslip.run'
state
Selection
copy=False
default='draft'
help="* When the payslip is created the status is 'Draft'\n \n* If the payslip is under verification, the status is 'Waiting'.\n \n* If the payslip is confirmed then status is set to 'Done'.\n \n* When user cancel payslip the status is 'Rejected'."
index=True
readonly=True
string='Status'
args: [('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')]
struct_id
Many2one → hr.payroll.structure
help="Defines the rules that have to be applied to this payslip, accordingly to the contract chosen. If you let empty the field contract, this field isn't mandatory anymore and thus the rules applied will be all the rules set on the structure of all contracts of the employee valid for the chosen period"
readonly=True
states={'draft': [('readonly', False)]}
string='Structure'
args: 'hr.payroll.structure'
worked_days_line_ids
One2many → hr.payslip.worked_days
copy=True
readonly=True
states={'draft': [('readonly', False)]}
string='Payslip Worked Days'
args: 'hr.payslip.worked_days', 'payslip_id'
action_payslip_cancel(self)
action_payslip_done(self)
action_payslip_draft(self)
check_done(self)
compute_sheet(self)
copy(self, default=None)
get_inputs(self, contracts, date_from, date_to)
get_payslip_vals(self, date_from, date_to, employee_id=False, contract_id=False)
get_salary_line_total(self, code)
get_worked_day_lines(self, contracts, date_from, date_to)
onchange_contract(self)
onchange_employee(self)
refund_sheet(self)
unlink(self)
employee_ids
Many2many → hr.employee
compute_sheet(self)
amount
Float
help='It is used in computation. For e.g. A rule for sales having 1% commission of basic salary for per product can defined in expression like result = inputs.SALEURO.amount * contract.wage*0.01.'
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
amount
Float
digits='Payroll'
contract_id
Many2one → hr.contract
index=True
required=True
string='Contract'
args: 'hr.contract'
employee_id
Many2one → hr.employee
required=True
string='Employee'
args: 'hr.employee'
quantity
Float
default=1.0
digits='Payroll'
rate
Float
default=100.0
digits='Payroll Rate'
string='Rate (%)'
salary_rule_id
Many2one → hr.salary.rule
required=True
string='Rule'
args: 'hr.salary.rule'
slip_id
Many2one → hr.payslip
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
total
Float
compute='_compute_total'
digits='Payroll'
store=True
string='Total'
create(self, vals_list)
credit_note
Boolean
help='If its checked, indicates that all payslips generated from here are refund payslips.'
readonly=True
states={'draft': [('readonly', False)]}
string='Credit Note'
date_end
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date To'
date_start
Date
default=<expr>
readonly=True
required=True
states={'draft': [('readonly', False)]}
string='Date From'
name
Char
readonly=True
required=True
states={'draft': [('readonly', False)]}
slip_ids
One2many → hr.payslip
readonly=True
states={'draft': [('readonly', False)]}
string='Payslips'
args: 'hr.payslip', 'payslip_run_id'
state
Selection
copy=False
default='draft'
index=True
readonly=True
string='Status'
args: [('draft', 'Draft'), ('close', 'Close')]
close_payslip_run(self)
draft_payslip_run(self)
code
Char
help='The code that can be used in the salary rules'
required=True
contract_id
Many2one → hr.contract
help='The contract for which applied this input'
required=True
string='Contract'
args: 'hr.contract'
name
Char
required=True
string='Description'
number_of_days
Float
string='Number of Days'
number_of_hours
Float
string='Number of Hours'
payslip_id
Many2one → hr.payslip
index=True
ondelete='cascade'
required=True
string='Pay Slip'
args: 'hr.payslip'
sequence
Integer
default=10
index=True
required=True
No public methods.
code
Char
help='The code that can be used in the salary rules'
required=True
input_id
Many2one → hr.salary.rule
required=True
string='Salary Rule Input'
args: 'hr.salary.rule'
name
Char
required=True
string='Description'
No public methods.
active
Boolean
default=True
help='If the active field is set to false, it will allow you to hide the salary rule without removing it.'
amount_fix
Float
digits='Payroll'
string='Fixed Amount'
amount_percentage
Float
digits='Payroll Rate'
help='For example, enter 50.0 to apply a percentage of 50%'
string='Percentage (%)'
amount_percentage_base
Char
help='result will be affected to a variable'
string='Percentage based on'
amount_python_compute
Text
default="\n # Available variables:\n #----------------------\n # payslip: object containing the payslips\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days.\n # inputs: object containing the computed inputs.\n\n # Note: returned value have to be set in the variable 'result'\n\n result = contract.wage * 0.10"
string='Python Code'
amount_select
Selection
default='fix'
help='The computation method for the rule amount.'
index=True
required=True
string='Amount Type'
args: [('percentage', 'Percentage (%)'), ('fix', 'Fixed Amount'), ('code', 'Python Code')]
appears_on_payslip
Boolean
default=True
help='Used to display the salary rule on payslip.'
string='Appears on Payslip'
category_id
Many2one → hr.salary.rule.category
required=True
string='Category'
args: 'hr.salary.rule.category'
child_ids
One2many → hr.salary.rule
copy=True
string='Child Salary Rule'
args: 'hr.salary.rule', 'parent_rule_id'
code
Char
help='The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive.'
required=True
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
condition_python
Text
default="\n # Available variables:\n #----------------------\n # payslip: object containing the payslips\n # employee: hr.employee object\n # contract: hr.contract object\n # rules: object containing the rules code (previously computed)\n # categories: object containing the computed salary rule categories\n # (sum of amount of all rules belonging to that category).\n # worked_days: object containing the computed worked days\n # inputs: object containing the computed inputs\n\n # Note: returned value have to be set in the variable 'result'\n\n result = rules.NET > categories.NET * 0.10"
help='Applied this rule for calculation if condition is true. You can specify condition like basic > 1000.'
required=True
string='Python Condition'
condition_range
Char
default='contract.wage'
help='This will be used to compute the % fields values; in general it is on basic, but you can also use categories code fields in lowercase as a variable names (hra, ma, lta, etc.) and the variable basic.'
string='Range Based on'
condition_range_max
Float
help='The maximum amount, applied for this rule.'
string='Maximum Range'
condition_range_min
Float
help='The minimum amount, applied for this rule.'
string='Minimum Range'
condition_select
Selection
default='none'
required=True
string='Condition Based on'
args: [('none', 'Always True'), ('range', 'Range'), ('python', 'Python Expression')]
input_ids
One2many → hr.rule.input
copy=True
string='Inputs'
args: 'hr.rule.input', 'input_id'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_rule_id
Many2one → hr.salary.rule
index=True
string='Parent Salary Rule'
args: 'hr.salary.rule'
quantity
Char
default='1.0'
help='It is used in computation for percentage and fixed amount. For e.g. A rule for Meal Voucher having fixed amount of 1€ per worked day can have its quantity defined in expression like worked_days.WORK100.number_of_days.'
register_id
Many2one → hr.contribution.register
help='Eventual third party involved in the salary payment of the employees.'
string='Contribution Register'
args: 'hr.contribution.register'
sequence
Integer
default=5
help='Use to arrange calculation sequence'
index=True
required=True
No public methods.
children_ids
One2many → hr.salary.rule.category
string='Children'
args: 'hr.salary.rule.category', 'parent_id'
code
Char
required=True
company_id
Many2one → res.company
default=<expr>
string='Company'
args: 'res.company'
name
Char
required=True
translate=True
note
Text
string='Description'
parent_id
Many2one → hr.salary.rule.category
help='Linking a salary category to its parent is used only for the reporting purpose.'
string='Parent'
args: 'hr.salary.rule.category'
No public methods.
date_from
Date
default=datetime.now().strftime('%Y-%m-01')
required=True
string='Date From'
date_to
Date
default=<expr>
required=True
string='Date To'
print_report(self)
No new fields.
Public methods (0)No public methods.
No new fields.
Public methods (2)get_details_by_rule_category(self, payslip_lines)
get_lines_by_contribution_register(self, payslip_lines)
module_payroll_account
Boolean
string='Payroll Accounting'
No public methods.