Managing payroll efficiently is a critical task for HR and accounting teams. In Odoo 18, the payroll module offers a powerful and flexible way to calculate employee salaries based on various parameters, including standard working hours. This guide will walk you through the process of generating payslips based on each employee's predefined working schedule.
By aligning the payslip computation with the employee's contracted working hours, Odoo ensures accuracy in salary calculation, accounting for attendance, leaves, and other related rules. Whether you're running payroll for hourly or salaried staff, this approach provides a clear and compliant method to handle payroll operations.
Step 1: Configure Employee Contracts with Standard Working Hours
Employee contracts define the foundation for payroll calculations, including working hours, wages, and employment terms.
1.1 Define Standard Working Hours in Employee Contracts
Navigate to Employees > Contracts or Payroll > Contracts.

Create or Edit a contract and set:
* Standard Working Hours: The total number of hours an employee is contractually obligated to work in a day/week. (e.g., 8 hours/day or 40 hours/week).
* Working Schedule :The specific days and times an employee is expected to work.(e.g., "Monday–Friday, 9 AM–5 PM").
* Wage Type :(Fixed or Hourly)
1. Fixed: When pay doesn't fluctuate with hours
2. Hourly: When tracking exact worked hours is necessary
* Schedule Pay (Monthly, Weekly, or Daily).
1. Monthly: Most salaried employeesPaid on 25th of each month
2. Weekly: Hourly workersEvery Friday
3. DailyDay laborers/contractorsEnd of each workday

Ensure that the contract is running.

Step2: Work Entry Generation Against Employee Contracts
When an employee’s contract includes standard working hours, Odoo automatically generates Work Entries (attendance, leaves, overtime) that influence payslip calculations.
* Navigate to Payroll > Work Entries to see generated entries.
* Odoo tracks:
1. Regular Hours (based on contract).
2. Overtime (if working hours exceed the standard).
3. Leaves (paid or unpaid).
Here we can create some work entries
1.Sick time

2.Overtime

3.Unpaid

Step 3: Define Payroll Rules for Salary Calculation
Payroll rules automate wage computation, deductions, and allowances.
2.1 Key Salary Rules to Configure
Go to Payroll > Configuration > Salary Rules and define:
1. Basic Wage Rule
* Formula: contract.wage (for fixed salary) or worked_days.WORK100.number_of_hours * contract.hourly_wage (for hourly employees).
* Links to WORK100 (standard working hours).
2. Allowances (e.g., Transport Allowance)
* Formula: 500 (fixed) or contract.wage * 0.05 (5% of basic).
3. Gross Salary Rule
* Formula: Sum of basic wage + allowances.
4. Deductions (e.g., Tax, Loan, Unpaid Leave Deduction)
* Tax Rule: gross * 0.1 (10% of gross).
* Unpaid Leave Deduction: (unpaid_leave_days * (contract.wage / 30)).
5. Net Salary Rule
* Formula: gross - total_deductions.

Step 4: Generate Payslips
Batch processing in Odoo minimizes manual effort and reduces errors. Follow these steps to generate payslips efficiently:
1. Initiate Payslip Creation
* Go to Payroll > Payslips and click Payslip to Pay.
* Click New to start a batch.
2. Select Employees
* Choose individual employees or groups (e.g., “All Active Employees”).
* Best Practice: Filter by department or contract type for targeted payroll runs.
3. Compute Payslip Details
* Click Compute Sheet to let Odoo auto-populate wages, overtime, and deductions based on contracts and rules.
* Troubleshooting Tip: Review the “Worked Days” tab to ensure attendance data aligns with expectations.

How to calculate the final net salary
* Basic Salary (Hourly Rate: $100)
* Attendance Hours (Regular Work):
* 160 hours (20 days × 8 hours/day)
* Amount: 160 × $100 = **$16,000**
Total Earnings (Gross Pay):
$16,000 (Basic) + $400 (PTO) + $500 (Overtime) + $1,200 (HRA) + $800 + $600 + $200 = **$19,700**
Leave & Absence Impact :
* Sick Leave (Unpaid):
- 8 hours (1 day) > $0 (No pay deducted).
* Unpaid Leave:
- 12 hours (1.5 days) > $0 (Salary deduction applied later).
Deductions :
Type | Amount | Explanation |
Provident Fund (PF) | -$375 | Retirement contribution (e.g., 2% of basic) |
Professional Tax | -$200 | Government-mandated tax |
Total Deductions: $375 + $200 = **$575**
Net Salary Calculation
Formula:
Gross Pay – Deductions = Net Salary
Calculation:
$19,700 (Gross) – $575 (Deductions) = **$19,125 (Net Pay)**

4. Validate and Finalize
* Verify all entries, then click Validate to confirm the payslip.
* Employees can access their payslips via the portal, fostering transparency.
Mastering payroll management in Odoo 18 not only streamlines administrative tasks but also ensures accuracy, compliance, and employee satisfaction. By configuring employee contracts, defining precise payroll rules, and leveraging batch processing for payslip generation, businesses can eliminate manual errors, reduce administrative overhead, and foster transparency.
Generating payslips based on employee standard working hours in Odoo 18 is a structured and efficient process that ensures payroll accuracy and compliance. By properly configuring employee contracts, leveraging automated work entries, and defining dynamic salary rules, HR teams can streamline payroll operations while accommodating various wage types, leave policies, and deductions.
To read more about How to Generate Payslips in Batches With Odoo 16, refer to our blog How to Generate Payslips in Batches With Odoo 16.