Salary Rules
Salary rules define the components that are included in payroll calculations, the methods used to calculate each component, and the specific chart of accounts that will be impacted by payroll transactions. These rules are configured based on Panama local requirements. For Odoo's base module documentation, please click here.
To manage salary rules, follow these steps:
- In the Payroll app, go to Configuration > Rules.
The default salary structures, 13er Mes (PA) and Sample Structure PA Template, are pre-configured with the necessary salary rules.
Salary Rule Sequence Number
The Sequence Number field in the salary rule dictates the order in which the lines appear on the payslip. While the field is editable, it is important to follow proper sequencing based on the rule category to ensure accurate and logical presentation of payroll information.
Rules sequencing based on category:
- Basic
- Regular Allowance
- Other Allowance
- Gross
- Contribution
- Deduction
- Accrued Allowances
- Acumulado XIII
- Net
General - Python Codes
The default salary rules should not be modified to ensure consistency and accuracy in payroll processing. If the company requires different rules, it is recommended to create a new Salary Structure with its own set of Salary Rules to meet specific needs without affecting the default configuration.
Below are the Python Codes for salary rules.
- Salario básico: "result = payslip.paid_amount"
- [Regular] Allowance: "result = contract.get_allowances_amount(code='HOUSING')"
- Note: The code "HOUSING" is used as an example and can be replaced with any preferred unique code, as long as it remains consistent and does not conflict with other existing codes
- [Other] Allowance: "result = contract.get_other_allowances_amount(payslip.date_from,payslip.date_to,code='OAllowance')"
- [Gross] Bruto: "result = (categories.get("BASIC") or 0) + (categories.get("ALW") or 0)"
- [Company Contribution] Seguro Social (Empleador): "result_rules['BASIC']['total']"
- [Company Contribution] Seguro Educativo (Empleador): "result_rules['BASIC']['total']"
- [Company Contribution] Riesgo Profesional: "result = result_rules['BASIC']['total'] * (payslip.struct_id.type_id.panama_riesgo_profesional_employer / 100)"
- [Employee Deduction] Employee Income Tax: "result = -payslip.get_withholding_tax_amount()"
- [Employee Deduction] Seguro Social: "result_rules['BASIC']['total']"
- [Employee Deduction] Seguro Educativo Tax: "result_rules['BASIC']['total']"
- Regular Deduction: "result = -contract.get_deductions_amount(code='DEDUCTIONNEW')"
- Other Deduction: "result = -contract.get_other_deductions_amount(payslip.date_from, payslip.date_to, code='OTHERDEDUCTION')"
- [Accrued Allowance] Prima de Antigüedad: "result_rules['BASIC']['total']"
- [Accrued Allowance] Indemnización: "result_rules['BASIC']['total']"
- [Accrued Allowance] Vacaciones: "result = ((categories.get("BASIC") or 0) + (categories.get("ALW") or 0)) / 11"
- Acumulado XIII: "result_rules['BASIC']['total']"
- Salario neto: "result = (categories.get("BASIC") or 0) + (categories.get("ALW") or 0) + (categories.get("DED") or 0)"
For reference, a Rule Creation Guide is available to assist when creating new salary rules.
- Click the
button to create new salary rule.
- Under the General tab, set the Computation Amount Type to Python Code.
- Refer to the available code snippets provided for different salary rule categories to ensure accurate configuration.
Description
The Description field is intended for adding internal notes or comments about the salary rule. These notes can provide context, clarification, or additional information for administrators and should not appear on the employee's payslip.
Accounting
Configure the Debit and Credit accounts to define how the amounts from payslip lines will be recorded in the general ledger. Additionally, specify the appropriate Analytic Accounts to enable cost tracking by department, project, or other analytic dimensions.
Proper configuration ensures that payroll entries are accurately reflected in financial reports and aligned with the organization's accounting structure. Confirmation from the company's Accounting team is necessary to ensure the correct accounts are used and comply with internal financial procedures.
How to Assign Correct Accounts:
- Set the same account for both the Debit and Credit fields of the Net Pay salary rule. This account should be a Current Liability account type, reflecting the amount owed to employees but not yet paid.
Example:
- Rules that impact the Net Pay calculation, such as Basic, Regular Allowance, Other Allowance, Regular Deduction, and Other Deduction, must use identical Debit and Credit accounts. Ensure that the accounts used do not affect the account set for the Net Pay salary rule.
- Example: For a Housing Allowance, if the entry includes a debit to "Housing Expense" and a credit to "Salary Payable", the Housing Allowance rule should have both its Debit and Credit set to "Housing Expense".
- Housing Allowance
- Basic Salary
- Seguro Social [Employee Deduction]
- The Company Contribution, Accrued Allowance, and Acumulado XIII rule categories should be configured with the "expected" Debit and Credit accounts that reflect the corresponding journal entry.
- Example: For a Social Security Company Contribution, the journal entry might include a debit to an expense account and a credit to a liability account. In this case, the expense account should be set as the Debit in the salary rule, and the liability account should be set as the Credit.
- Indemnización
www.eduwebgroup.com