TIP: You can type at any time to perform a new search.
Payroll
payroll · OCA/payroll
- Repository
- OCA/payroll · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Payroll
- Folder size
- 6.41 MB
- License
- LGPL-3
- Application
- Yes
- Auto-installable
- No
- Website
- https://github.com/OCA/payroll
- Last tracking update
- 2026-08-07 09:06:34
- Authors
- Odoo SA, Odoo Community Association (OCA)
- Maintainers
- Odoo SA, Odoo Community Association (OCA)
- Committers
- Weblate, OCA-git-bot, oca-ci, Milan Topuzov, tishmen
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- 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.
Code Analysis ⓘ
Views touched (38)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
hr_contract_view_form |
hr.version.view.form.payroll | hr.version | form | 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 | form | 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 | form | 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 |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (18)
New fields (5)
-
company_idMany2one → res.companydefault=<expr>string='Company' args: 'res.company' -
nameCharrequired=True -
noteTextstring='Description' -
partner_idMany2one → res.partnerstring='Partner' args: 'res.partner' -
register_line_idsOne2many → hr.payslip.linereadonly=Truestring='Register Line' args: 'hr.payslip.line', 'register_id'
No public methods.
New fields (2)
-
payslip_countIntegercompute='_compute_payslip_count'groups='payroll.group_payroll_user' -
slip_idsOne2many → hr.payslipreadonly=Truestring='Payslips' args: 'hr.payslip', 'employee_id'
No public methods.
New fields (8)
-
children_idsOne2many → hr.payroll.structurecopy=Truestring='Children' args: 'hr.payroll.structure', 'parent_id' -
codeCharstring='Reference' -
company_idMany2one → res.companycopy=Falsedefault=<expr>required=Truestring='Company' args: 'res.company' -
nameCharrequired=True -
noteTextstring='Description' -
parent_idMany2one → hr.payroll.structuredefault=<expr>string='Parent' args: 'hr.payroll.structure' -
require_codeBooleancompute='_compute_require_code'default=<expr> args: 'Require code' -
rule_idsMany2many → hr.salary.rulestring='Salary Rules' args: 'hr.salary.rule', 'hr_structure_salary_rule_rel', 'struct_id', 'rule_id'
-
copy(self, default=None) -
get_all_rules(self)@return: recordset with all struct rules, ordered by sequence -
get_structure_with_parents(self)
New fields (24)
-
allow_cancel_payslipsBooleancompute='_compute_allow_cancel_payslips' args: 'Allow Canceling Payslips' -
company_idMany2one → res.companycopy=Falsedefault=<expr>readonly=Truestring='Company' args: 'res.company' -
compute_dateDate -
contract_idMany2one → hr.versionreadonly=Truestring='Contract'tracking=True args: 'hr.version' -
credit_noteBooleanhelp='Indicates this payslip has a refund of another'readonly=True -
date_fromDatedefault=<expr>readonly=Truerequired=Truetracking=True -
date_toDatedefault=<expr>readonly=Truerequired=Truetracking=True -
dynamic_filtered_payslip_linesOne2many → hr.payslip.linecompute='_compute_dynamic_filtered_payslip_lines' args: 'hr.payslip.line' -
employee_idMany2one → hr.employeereadonly=Truerequired=Truestring='Employee' args: 'hr.employee' -
hide_child_linesBooleandefault=False -
hide_invisible_linesBooleandefault=Falsestring='Show only lines that appear on payslip' -
input_line_idsOne2many → hr.payslip.inputreadonly=Truestring='Payslip Inputs' args: 'hr.payslip.input', 'payslip_id' -
line_idsOne2many → hr.payslip.linereadonly=Truestring='Payslip Lines' args: 'hr.payslip.line', 'slip_id' -
nameCharstring='Payslip Name' -
noteTextreadonly=Truestring='Internal Note'tracking=True -
numberCharcopy=Falsereadonly=Truestring='Reference' -
paidBooleancopy=Falsereadonly=Truestring='Made Payment Order ? ' -
payslip_countIntegercompute='_compute_payslip_count'string='Payslip Computation Details' -
payslip_run_idMany2one → hr.payslip.runcopy=Falsereadonly=Truestring='Payslip Batches'tracking=True args: 'hr.payslip.run' -
prevent_compute_on_confirmBooleancompute='_compute_prevent_compute_on_confirm' args: 'Prevent Compute on Confirm' -
refunded_idMany2one → hr.payslipreadonly=Truestring='Refunded Payslip' args: 'hr.payslip' -
stateSelectioncopy=Falsedefault='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=Truereadonly=Truestring='Status'tracking=True args: [('draft', 'Draft'), ('verify', 'Waiting'), ('done', 'Done'), ('cancel', 'Rejected')] -
struct_idMany2one → hr.payroll.structurehelp="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=Truestring='Structure' args: 'hr.payroll.structure' -
worked_days_line_idsOne2many → hr.payslip.worked_dayscopy=Truereadonly=Truestring='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)Contract dependent dictionary values. This method is called just before the salary rules are evaluated for contract. This method is evaluated once for every contract in the payslip. :param contract: The current hr.contract being processed :param contracts: Recordset of all hr.contract records in this payslip :return: a dictionary of discreet values and/or Browsable Objects -
get_inputs(self, contracts, date_from, date_to)@api.modelInputs computation. @returns: Returns a dict with the inputs that are fetched from the salary_structure associated rules for the given contracts. -
get_lines_dict(self) -
get_payroll_dict(self, contracts)Setup miscellaneous dictionary values. Other modules may overload this method to inject discreet values into the salary rules. Such values will be available to the salary rule under the `payroll.` prefix. This method is evaluated once per payslip. :param contracts: Recordset of all hr.contract records in this payslip :return: a dictionary of discreet values and/or Browsable Objects -
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)@api.model@param contracts: Browse record of contracts @return: returns a list of dict containing the input that should be applied for the given contract between date_from and date_to -
localdict_hook(self, localdict) -
onchange_contract(self)@api.onchange('contract_id') -
onchange_dates(self)@api.onchange('date_from', 'date_to') -
onchange_employee(self)@api.onchange('employee_id', 'date_from', 'date_to') -
onchange_struct_id(self)@api.onchange('struct_id') -
refund_sheet(self)
New fields (1)
-
stateSelectionhelp="* 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)
New fields (1)
-
employee_idsMany2many → hr.employeeargs: 'hr.employee', 'hr_employee_group_rel', 'payslip_id', 'employee_id', 'Employees'
-
compute_sheet(self)
New fields (7)
-
amountFloathelp='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_qtyFloathelp='It can be used in computation for other inputs' args: 'Amount Quantity' -
codeCharhelp='The code that can be used in the salary rules'required=True -
contract_idMany2one → hr.versionhelp='The contract for which applied this input'required=Truestring='Contract' args: 'hr.version' -
nameCharrequired=Truestring='Description' -
payslip_idMany2one → hr.payslipindex=Trueondelete='cascade'required=Truestring='Pay Slip' args: 'hr.payslip' -
sequenceIntegerdefault=10index=Truerequired=True
No public methods.
New fields (13)
-
allow_edit_payslip_linesBooleancompute='_compute_allow_edit_payslip_lines' args: 'Allow editing' -
amountFloatdigits='Payroll' -
child_idsOne2many → hr.payslip.linestring='Child Payslip Lines' args: 'hr.payslip.line', 'parent_line_id' -
contract_idMany2one → hr.versionindex=Truerequired=Truestring='Contract' args: 'hr.version' -
date_fromDaterelated='slip_id.date_from'store=True args: 'Date From' -
employee_idMany2one → hr.employeerequired=Truestring='Employee' args: 'hr.employee' -
parent_line_idMany2one → hr.payslip.linecompute='_compute_parent_line_id'store=Truestring='Parent Payslip Line' args: 'hr.payslip.line' -
payslip_run_idMany2one → hr.payslip.runrelated='slip_id.payslip_run_id'string='Payslip Batch' args: 'hr.payslip.run' -
quantityFloatdefault=1.0digits='Payroll' -
rateFloatdefault=100.0digits='Payroll Rate'string='Rate (%)' -
salary_rule_idMany2one → hr.salary.rulerequired=Truestring='Rule' args: 'hr.salary.rule' -
slip_idMany2one → hr.payslipondelete='cascade'required=Truestring='Pay Slip' args: 'hr.payslip' -
totalFloatcompute='_compute_total'digits='Payroll'store=True
-
create(self, vals_list)@api.model_create_multi
New fields (8)
-
company_idMany2one → res.companycopy=Falsedefault=<expr>required=Truestring='Company' args: 'res.company' -
credit_noteBooleanhelp='If its checked, indicates that all payslips generated from here are refund payslips.'readonly=True -
date_endDatedefault=<expr>readonly=Truerequired=Truestring='Date To' -
date_startDatedefault=<expr>readonly=Truerequired=Truestring='Date From' -
nameCharreadonly=Truerequired=True -
slip_idsOne2many → hr.payslipreadonly=Truestring='Payslips' args: 'hr.payslip', 'payslip_run_id' -
stateSelectioncopy=Falsedefault='draft'index=Truereadonly=Truestring='Status'tracking=1 args: [('draft', 'Draft'), ('close', 'Close')] -
struct_idMany2one → hr.payroll.structurehelp="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=Truestring='Structure' args: 'hr.payroll.structure'
-
close_payslip_run(self) -
draft_payslip_run(self)
New fields (7)
-
codeCharhelp='The code that can be used in the salary rules'required=True -
contract_idMany2one → hr.versionhelp='The contract for which applied this input'required=Truestring='Contract' args: 'hr.version' -
nameCharrequired=Truestring='Description' -
number_of_daysFloatstring='Number of Days' -
number_of_hoursFloatstring='Number of Hours' -
payslip_idMany2one → hr.payslipindex=Trueondelete='cascade'required=Truestring='Pay Slip' args: 'hr.payslip' -
sequenceIntegerdefault=10index=Truerequired=True
No public methods.
New fields (3)
-
codeCharhelp='The code that can be used in the salary rules'required=True -
input_idMany2one → hr.salary.rulerequired=Truestring='Salary Rule Input' args: 'hr.salary.rule' -
nameCharrequired=Truestring='Description'
No public methods.
New fields (24)
-
activeBooleandefault=Truehelp='If the active field is set to false, it will allow you to hide the salary rule without removing it.' -
amount_fixFloatdigits='Payroll'string='Fixed Amount' -
amount_percentageFloatdigits='Payroll Rate'help='For example, enter 50.0 to apply a percentage of 50%'string='Percentage (%)' -
amount_percentage_baseCharhelp='result will be affected to a variable'string='Percentage based on' -
amount_python_computeTextdefault='# 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_selectSelectiondefault='fix'help='The computation method for the rule amount.'index=Truerequired=Truestring='Amount Type' args: [('percentage', 'Percentage (%)'), ('fix', 'Fixed Amount'), ('code', 'Python Code')] -
appears_on_payslipBooleandefault=Truehelp='Used to display the salary rule on payslip.'string='Appears on Payslip' -
category_idMany2one → hr.salary.rule.categorystring='Category' args: 'hr.salary.rule.category' -
child_idsOne2many → hr.salary.rulecopy=Truestring='Child Salary Rule' args: 'hr.salary.rule', 'parent_rule_id' -
codeCharhelp='The code of salary rules can be used as reference in computation of other rules. In that case, it is case sensitive.' -
company_idMany2one → res.companydefault=<expr>string='Company' args: 'res.company' -
condition_pythonTextdefault="# 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=Truestring='Python Condition' -
condition_rangeChardefault='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_maxFloathelp='The maximum amount, applied for this rule.'string='Maximum Range' -
condition_range_minFloathelp='The minimum amount, applied for this rule.'string='Minimum Range' -
condition_selectSelectiondefault='none'required=Truestring='Condition Based on' args: [('none', 'Always True'), ('range', 'Range'), ('python', 'Python Expression')] -
input_idsOne2many → hr.rule.inputcopy=Truestring='Inputs' args: 'hr.rule.input', 'input_id' -
nameCharrequired=Truetranslate=True -
noteTextstring='Description' -
parent_rule_idMany2one → hr.salary.rulecomodel_name='hr.salary.rule'index=Truestring='Parent Salary Rule' -
quantityChardefault='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_idMany2one → hr.contribution.registerhelp='Eventual third party involved in the salary payment of the employees.'string='Contribution Register' args: 'hr.contribution.register' -
require_code_and_categoryBooleancompute='_compute_require_code_and_category'default=<expr> args: 'Require code and category' -
sequenceIntegerdefault=5help='Use to arrange calculation sequence'index=Truerequired=True
No public methods.
New fields (8)
-
children_idsOne2many → hr.salary.rule.categorystring='Children' args: 'hr.salary.rule.category', 'parent_id' -
codeChar -
company_idMany2one → res.companydefault=<expr>string='Company' args: 'res.company' -
nameCharrequired=Truetranslate=True -
noteTextstring='Description' -
parent_idMany2one → hr.salary.rule.categoryhelp='Linking a salary category to its parent is used only for the reporting purpose.'string='Parent' args: 'hr.salary.rule.category' -
require_codeBooleancompute='_compute_require_code'default=<expr> args: 'Require code' -
salary_rules_idsOne2many → hr.salary.rulestring='Salary Rule Categories' args: 'hr.salary.rule', 'category_id'
No public methods.
New fields (3)
-
resource_calendar_idMany2onehelp="Employee's working schedule." -
schedule_paySelectiondefault='monthly'help='Defines the frequency of the wage payment.'index=Truestring='Scheduled Pay' args: [('monthly', 'Monthly'), ('quarterly', 'Quarterly'), ('semi-annually', 'Semi-annually'), ('annually', 'Annually'), ('weekly', 'Weekly'), ('bi-weekly', 'Bi-weekly'), ('bi-monthly', 'Bi-monthly')] -
struct_idMany2one → hr.payroll.structurestring='Salary Structure' args: 'hr.payroll.structure'
-
get_all_structures(self)@return: the structures linked to the given contracts, ordered by hierachy (parent=False first, then first level children and so on) and without duplicates
New fields (2)
-
date_fromDatedefault=datetime.now().strftime('%Y-%m-01')required=True -
date_toDatedefault=<expr>required=True
-
print_report(self)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (2)-
get_details_by_rule_category(self, payslip_lines) -
get_lines_by_contribution_register(self, payslip_lines)
New fields (6)
-
allow_cancel_payslipsBooleanconfig_parameter='payroll.allow_cancel_payslips'help='Allow users to cancel confirmed payslips.'string='Allow canceling confirmed payslips' -
allow_edit_payslip_linesBooleanconfig_parameter='payroll.allow_edit_payslip_lines'default=Falsehelp='Allow users to edit some payslip line fields manually'string='Allow editing payslip lines' -
leaves_positiveBooleanconfig_parameter='payroll.leaves_positive'help='In payslip worked days, leave days/hours have positive values'string='Leaves with positive values' -
module_payroll_accountBooleanstring='Payroll Accounting' -
prevent_compute_on_confirmBooleanconfig_parameter='payroll.prevent_compute_on_confirm'default=Truehelp='Prevent payslips from being recomputed when confirming them'string='Confirm payslips without recomputing' -
require_code_and_categoryBooleanconfig_parameter='payroll.require_code_and_category'default=Falsehelp='Require rule.code, rule.category, category.code, structure.code'string='Require code/category on rules, categories and structures'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…