Payslip Based on Working Hours in Odoo 18
By Braincuber Team
Published on January 13, 2026
Your manufacturing company employs 85 production workers. Some work standard 8-hour shifts, others do 10-hour shifts for premium pay, and supervisors are salaried with overtime eligibility after 45 hours weekly. Every month, HR manually calculates hours from attendance records, applies the correct hourly or daily rates, adds overtime premiums, deducts unpaid leave, and generates payslips. The process takes three days, errors happen regularly, and employees complain about discrepancies.
Odoo 18's payroll module automates this entire workflow by linking payslips directly to employee contracts and work entries. You define each employee's standard working hours in their contract—8 hours per day, 40 hours per week, or whatever their schedule specifies. Odoo automatically generates work entries from attendance, tracks regular hours versus overtime, accounts for leaves, and applies salary rules that calculate wages based on actual hours worked. The result is accurate payslips generated in minutes instead of days.
Core Workflow: Contract defines standard hours → Odoo generates work entries from attendance → Salary rules calculate wages based on hours worked → Payslip computed automatically. Works for hourly workers, salaried employees, and mixed compensation structures.
Why Link Payslips to Working Hours?
Accurate Hour Tracking
Work entries capture regular hours, overtime, and leaves automatically. No manual calculations—the system knows exactly how many hours each employee worked.
Flexible Wage Types
Support both fixed salary and hourly wage employees. Hourly workers get paid per hour worked; salaried employees can still have overtime calculations.
Compliance Ready
Accurate records of hours worked, wages paid, and deductions applied. Essential for labor law compliance and audit trails.
Batch Processing
Generate payslips for entire departments or the whole company in one click. Filter by contract type, department, or employee group.
Complete Payroll Workflow
PAYSLIP GENERATION BASED ON WORKING HOURS
═══════════════════════════════════════════════════════════
STEP 1: CONTRACT CONFIGURATION
───────────────────────────────────────────────────────────
Define in Employee Contract:
• Standard Working Hours (8 hours/day, 40 hours/week)
• Working Schedule (Mon-Fri, 9 AM - 5 PM)
• Wage Type: Fixed or Hourly
• Schedule Pay: Monthly, Weekly, or Daily
• Wage Amount: Monthly salary or hourly rate
STEP 2: WORK ENTRY GENERATION
───────────────────────────────────────────────────────────
Odoo automatically creates work entries:
• Regular Hours (WORK100) - Standard contract hours
• Overtime Hours (OVERTIME) - Beyond standard hours
• Paid Leave (LEAVE200) - Vacation, holidays
• Sick Leave (LEAVE300) - Medical leave
• Unpaid Leave (LEAVE400) - No pay deducted
STEP 3: SALARY RULES EXECUTION
───────────────────────────────────────────────────────────
Rules calculate in sequence:
1. Basic Wage → contract.wage (fixed) or
hours × hourly_rate (hourly)
2. Overtime → overtime_hours × rate × 1.5
3. Allowances → Transport, HRA, bonuses
4. Gross Salary → Basic + Overtime + Allowances
5. Deductions → Tax, loans, unpaid leave
6. Net Salary → Gross - Deductions
STEP 4: PAYSLIP GENERATION
───────────────────────────────────────────────────────────
1. Navigate to Payroll → Payslips
2. Create batch for period (e.g., January 2026)
3. Select employees (all or filtered)
4. Click "Compute Sheet" → Auto-populates all fields
5. Review worked days and salary details
6. Click "Validate" to finalize
Step 1: Configure Employee Contracts
Employee contracts define the foundation for payroll calculations. Each contract specifies working hours, wage type, and compensation structure.
Access Contract Configuration
- Navigate to Employees → Contracts or Payroll → Contracts
- Create a new contract or edit an existing one
- Ensure the contract status is Running
EMPLOYEE CONTRACT: Production Worker (Hourly)
═══════════════════════════════════════════════════════════
BASIC INFORMATION
───────────────────────────────────────────────────────────
Employee: James Martinez
Contract Reference: CNT/2026/0045
Contract Type: Full-time
Department: Production
Start Date: January 1, 2026
Status: Running
WORKING HOURS CONFIGURATION
───────────────────────────────────────────────────────────
Standard Working Hours: 8 hours/day
Weekly Hours: 40 hours/week
Working Schedule: Standard 40 Hours/Week
Mon-Fri: 8:00 AM - 5:00 PM
(1 hour lunch break)
COMPENSATION STRUCTURE
───────────────────────────────────────────────────────────
Wage Type: Hourly
Hourly Rate: $28.50/hour
Schedule Pay: Weekly (every Friday)
Overtime Rate: 1.5x ($42.75/hour)
Expected Weekly Pay: 40 hours × $28.50 = $1,140.00
Expected Monthly Pay: ~$4,940.00 (avg 173.33 hours)
───────────────────────────────────────────────────────────
EMPLOYEE CONTRACT: Office Manager (Fixed Salary)
═══════════════════════════════════════════════════════════
BASIC INFORMATION
───────────────────────────────────────────────────────────
Employee: Sarah Chen
Contract Reference: CNT/2026/0022
Contract Type: Full-time
Department: Administration
Start Date: March 15, 2025
Status: Running
WORKING HOURS CONFIGURATION
───────────────────────────────────────────────────────────
Standard Working Hours: 8 hours/day
Weekly Hours: 40 hours/week
Working Schedule: Standard 40 Hours/Week
Overtime Eligible: Yes (after 40 hours/week)
COMPENSATION STRUCTURE
───────────────────────────────────────────────────────────
Wage Type: Fixed
Monthly Salary: $5,800.00
Schedule Pay: Monthly (25th of each month)
Overtime Rate: 1.5x (calculated from hourly equivalent)
Hourly Equivalent: $5,800 / 173.33 = $33.46/hour
ALLOWANCES INCLUDED
───────────────────────────────────────────────────────────
Transport Allowance: $200/month (fixed)
HRA (Housing): $400/month (fixed)
Professional Dev: $150/month (fixed)
Total Allowances: $750/month
Step 2: Work Entry Generation
When contracts include standard working hours, Odoo automatically generates work entries based on attendance, leaves, and schedule. These entries drive payslip calculations.
WORK ENTRY TYPES IN ODOO 18 PAYROLL
═══════════════════════════════════════════════════════════
ENTRY CODE | DESCRIPTION | PAYROLL IMPACT
═══════════════════════════════════════════════════════════
WORK100 | Regular Working Hours | Paid at base rate
OVERTIME | Overtime Hours | Paid at 1.5x rate
LEAVE200 | Paid Time Off (PTO) | Paid at base rate
LEAVE300 | Sick Leave (Paid) | Paid at base rate
LEAVE400 | Unpaid Leave | No pay (deduction)
LEAVE500 | Compensatory Leave | Paid at base rate
HOLIDAY | Public Holiday | Paid at base rate
TRAINING | Training Hours | Paid at base rate
EXAMPLE: JANUARY 2026 WORK ENTRIES FOR JAMES MARTINEZ
═══════════════════════════════════════════════════════════
Week 1 (Jan 1-5)
───────────────────────────────────────────────────────────
Jan 1 (Wed): HOLIDAY - New Year's Day 8 hours
Jan 2 (Thu): WORK100 - Regular Work 8 hours
Jan 3 (Fri): WORK100 - Regular Work 8 hours
Week Total: 24 hours (8 holiday + 16 regular)
Week 2 (Jan 6-10)
───────────────────────────────────────────────────────────
Jan 6 (Mon): WORK100 - Regular Work 8 hours
Jan 7 (Tue): WORK100 - Regular Work 8 hours
Jan 8 (Wed): WORK100 - Regular Work 10 hours
└─ OVERTIME - 2 hours extra 2 hours
Jan 9 (Thu): WORK100 - Regular Work 8 hours
Jan 10 (Fri): LEAVE300 - Sick Leave 8 hours
Week Total: 44 hours (40 regular + 2 OT + 8 sick)
Week 3 (Jan 13-17)
───────────────────────────────────────────────────────────
Jan 13-17: WORK100 - Regular Work 40 hours
Week Total: 40 hours
Week 4 (Jan 20-24)
───────────────────────────────────────────────────────────
Jan 20 (Mon): LEAVE400 - Unpaid Leave 8 hours
Jan 21-24: WORK100 - Regular Work 32 hours
Week Total: 40 hours (32 paid + 8 unpaid)
JANUARY SUMMARY
═══════════════════════════════════════════════════════════
Regular Hours (WORK100): 128 hours
Overtime Hours (OVERTIME): 2 hours
Holiday Hours (HOLIDAY): 8 hours
Sick Leave (LEAVE300): 8 hours
Unpaid Leave (LEAVE400): 8 hours
───────────────────────────────────────────────────────────
Total Hours Tracked: 154 hours
Total Paid Hours: 146 hours
Step 3: Configure Salary Rules
Salary rules define how wages, allowances, and deductions are calculated. Each rule can reference work entries, contract values, and other rules.
SALARY RULES FOR WORKING HOURS-BASED PAYROLL ═══════════════════════════════════════════════════════════ Location: Payroll → Configuration → Salary Rules RULE 1: BASIC WAGE ─────────────────────────────────────────────────────────── Name: Basic Salary Code: BASIC Category: Basic Sequence: 1 Condition: Always True Formula (Fixed Salary): result = contract.wage Formula (Hourly Workers): result = worked_days.WORK100.number_of_hours * contract.hourly_wage Example Calculation (James - Hourly): 128 hours × $28.50 = $3,648.00 RULE 2: OVERTIME PAY ─────────────────────────────────────────────────────────── Name: Overtime Payment Code: OVERTIME Category: Allowance Sequence: 5 Condition: worked_days.OVERTIME.number_of_hours > 0 Formula: result = worked_days.OVERTIME.number_of_hours * contract.hourly_wage * 1.5 Example Calculation (James): 2 hours × $28.50 × 1.5 = $85.50 RULE 3: PAID LEAVE ─────────────────────────────────────────────────────────── Name: Paid Leave (Sick/PTO) Code: LEAVE_PAY Category: Allowance Sequence: 10 Condition: worked_days.LEAVE300.number_of_hours > 0 Formula: result = worked_days.LEAVE300.number_of_hours * contract.hourly_wage Example Calculation (James - 8 hours sick): 8 hours × $28.50 = $228.00 RULE 4: HOLIDAY PAY ─────────────────────────────────────────────────────────── Name: Holiday Pay Code: HOLIDAY_PAY Category: Allowance Sequence: 15 Condition: worked_days.HOLIDAY.number_of_hours > 0 Formula: result = worked_days.HOLIDAY.number_of_hours * contract.hourly_wage Example Calculation (James - New Year's Day): 8 hours × $28.50 = $228.00 RULE 5: GROSS SALARY ─────────────────────────────────────────────────────────── Name: Gross Salary Code: GROSS Category: Gross Sequence: 100 Formula: result = categories.BASIC + categories.ALW Example Calculation (James): $3,648.00 + $85.50 + $228.00 + $228.00 = $4,189.50 RULE 6: UNPAID LEAVE DEDUCTION ─────────────────────────────────────────────────────────── Name: Unpaid Leave Deduction Code: UNPAID_DED Category: Deduction Sequence: 150 Condition: worked_days.LEAVE400.number_of_hours > 0 Formula: result = -1 * worked_days.LEAVE400.number_of_hours * contract.hourly_wage Example Calculation (James - 8 hours unpaid): -8 hours × $28.50 = -$228.00 RULE 7: TAX DEDUCTION ─────────────────────────────────────────────────────────── Name: Income Tax Code: TAX Category: Deduction Sequence: 160 Formula: result = -1 * categories.GROSS * 0.12 # 12% tax rate Example Calculation (James): -$4,189.50 × 0.12 = -$502.74 RULE 8: NET SALARY ─────────────────────────────────────────────────────────── Name: Net Salary Code: NET Category: Net Sequence: 999 Formula: result = categories.GROSS + categories.DED Example Calculation (James): $4,189.50 + (-$228.00) + (-$502.74) = $3,458.76
Step 4: Generate Payslips
Create Payslip Batch
- Navigate to Payroll → Payslips → Payslips to Pay
- Click New to create a new payslip batch
- Set the period (e.g., January 1-31, 2026)
Select Employees
- Choose individual employees or groups
- Filter by department, contract type, or custom criteria
- Best Practice: Run separate batches for hourly and salaried employees
Compute Payslip Details
- Click Compute Sheet to auto-populate all fields
- Odoo reads work entries and applies salary rules
- Review the Worked Days tab to verify hours
- Check the Salary Computation tab for rule outputs
Validate and Finalize
- Verify all entries are correct
- Click Validate to confirm the payslip
- Employees can access their payslips via the employee portal
Complete Payslip Example
═══════════════════════════════════════════════════════════
PAYSLIP
═══════════════════════════════════════════════════════════
Employee: James Martinez
Employee ID: EMP-0045
Department: Production
Position: Production Worker
Period: January 1 - January 31, 2026
Payment Date: February 1, 2026
CONTRACT DETAILS
───────────────────────────────────────────────────────────
Contract Type: Hourly
Hourly Rate: $28.50
Overtime Rate: $42.75 (1.5x)
Standard Hours: 40 hours/week
WORKED DAYS / HOURS
═══════════════════════════════════════════════════════════
Entry Type | Days | Hours | Rate | Amount
───────────────────────────────────────────────────────────
Regular Work | 16 | 128 | $28.50 | $3,648.00
Overtime | - | 2 | $42.75 | $85.50
Public Holiday | 1 | 8 | $28.50 | $228.00
Sick Leave (Paid) | 1 | 8 | $28.50 | $228.00
Unpaid Leave | 1 | 8 | -$28.50 | -$228.00
───────────────────────────────────────────────────────────
Total Hours: 154 hours (146 paid)
EARNINGS
═══════════════════════════════════════════════════════════
Code | Description | Amount
───────────────────────────────────────────────────────────
BASIC | Basic Salary (128 hrs) | $3,648.00
OVERTIME | Overtime Pay (2 hrs) | $85.50
HOLIDAY | Holiday Pay (8 hrs) | $228.00
LEAVE_PAY | Sick Leave Pay (8 hrs) | $228.00
───────────────────────────────────────────────────────────
| GROSS EARNINGS | $4,189.50
DEDUCTIONS
═══════════════════════════════════════════════════════════
Code | Description | Amount
───────────────────────────────────────────────────────────
UNPAID | Unpaid Leave (8 hrs) | -$228.00
TAX | Income Tax (12%) | -$502.74
───────────────────────────────────────────────────────────
| TOTAL DEDUCTIONS | -$730.74
═══════════════════════════════════════════════════════════
NET SALARY | $3,458.76
═══════════════════════════════════════════════════════════
YEAR-TO-DATE SUMMARY
───────────────────────────────────────────────────────────
YTD Gross: $4,189.50
YTD Tax: $502.74
YTD Net: $3,458.76
Status: VALIDATED
Generated: February 1, 2026 09:15 AM
Wage Type Comparison
WAGE TYPE CALCULATION COMPARISON ═══════════════════════════════════════════════════════════ FIXED SALARY (Sarah Chen - Office Manager) ─────────────────────────────────────────────────────────── Contract: Monthly Salary: $5,800.00 Standard Hours: 40 hours/week (173.33 hours/month avg) Hourly Equivalent: $33.46/hour January 2026 (176 standard hours): Working Days: 22 days Worked: 21 days (1 day unpaid leave) Calculation: Base Salary: $5,800.00 Unpaid Leave Deduction: -$264.55 (8 hrs × $33.06) Transport Allowance: $200.00 HRA: $400.00 Professional Dev: $150.00 ───────────────────────────────── Gross: $6,285.45 Tax (12%): -$754.25 ───────────────────────────────── Net Salary: $5,531.20 HOURLY WAGE (James Martinez - Production Worker) ─────────────────────────────────────────────────────────── Contract: Hourly Rate: $28.50/hour Overtime Rate: $42.75/hour (1.5x) Standard Hours: 40 hours/week January 2026: Regular Hours: 128 hours Overtime Hours: 2 hours Paid Leave: 16 hours (holiday + sick) Unpaid Leave: 8 hours Calculation: Regular Work: 128 × $28.50 = $3,648.00 Overtime: 2 × $42.75 = $85.50 Paid Leave: 16 × $28.50 = $456.00 ───────────────────────────────── Gross: $4,189.50 Unpaid Deduction: -$228.00 Tax (12%): -$502.74 ───────────────────────────────── Net Salary: $3,458.76 KEY DIFFERENCES ═══════════════════════════════════════════════════════════ Aspect | Fixed Salary | Hourly Wage ──────────────────|─────────────────|─────────────────── Base Calculation | contract.wage | hours × rate Overtime Impact | Added on top | Direct calculation Unpaid Leave | Daily deduction | Hourly deduction Predictability | Stable monthly | Varies with hours Best For | Management | Production/hourly
Best Practices
✅ Payroll Best Practices:
- Review work entries before computing: Check Payroll → Work Entries to catch attendance discrepancies before generating payslips
- Use batch processing by department: Run payroll separately for hourly and salaried groups to catch issues early
- Validate worked days tab: After computing, verify the hours in the Worked Days tab match expected values
- Test salary rules with edge cases: Before going live, test with overtime, leaves, and zero-hour scenarios
- Keep contracts updated: Ensure all active employees have running contracts with correct wage information
- Archive old contracts: Close contracts when employees leave or change positions
- Document rule formulas: Add descriptions to salary rules explaining what each formula calculates
- Enable employee portal access: Let employees view their own payslips for transparency
Common Issues and Solutions
Payslip Shows Zero Hours
Work entries aren't being generated. Check that: (1) Employee has a running contract, (2) Contract has a working schedule assigned, (3) Attendance/work entries exist for the period.
Overtime Not Calculating
Verify that: (1) Work entry type OVERTIME exists and is configured, (2) Salary rule references worked_days.OVERTIME correctly, (3) Hours beyond standard are coded as OVERTIME in work entries.
Wrong Hourly Rate Applied
Check the contract's wage type (Fixed vs Hourly) and ensure the correct field is populated. For hourly, populate the hourly_wage field; for fixed, populate the wage field.
Conclusion
Generating payslips based on employee standard working hours in Odoo 18 creates accurate, auditable payroll that automatically accounts for regular work, overtime, leaves, and various compensation structures. By configuring contracts with proper working schedules and wage types, setting up work entries that track actual hours, and defining salary rules that calculate based on those hours, you eliminate manual calculations and reduce errors. Whether managing hourly production workers or salaried office staff, this workflow ensures every employee is paid correctly for the time they work.
🎯 Key Takeaway: Contract defines hours and wage type → Work entries track actual hours → Salary rules calculate based on hours worked → Payslip computed automatically. Accurate pay, less manual work, complete audit trail.
