Sandwich Rule for Leaves – Odoo 12 App
Updated on : 19 AUGUST, 2025

Image Source: odoo.com
Table Of Contents
- 1. Introduction
- 2. What is the Sandwich Rule in Odoo 12?
- 3. Key Features Overview
- 4. How the Sandwich Rule Works
- 5. Configuration in Odoo 12
- 6. Examples of Leave Deduction
- 7. Benefits for HR Teams
- 8. User Experience and UI
- 9. Pricing and Availability
- 10. Practical Use Cases
- 11. Comparison with Default Leave Policy
- 12. Strengths and Drawbacks
- 13. Who Should Use It?
- 14. Getting Started
- 15. FAQs
Table Of Contents
Introduction
The Sandwich Rule for Leaves in Odoo 12 simplifies leave management by counting holidays and weekends between two leave dates as part of the leave period. This ensures transparent HR policies and avoids payroll mismatches.

Image Source: odoo.com
What is the Sandwich Rule in Odoo 12?
The Sandwich Rule means that if an employee applies for leave before and after a holiday or weekend, then the holiday in between will also be treated as a leave day.
Example: If Saturday–Sunday is a weekend and an employee takes leave on Friday and Monday, then Sat–Sun will also be counted as leave.
Functionality | Description |
---|---|
Holiday Count | Includes weekends/holidays in applied leave. |
Automation | No need for manual HR intervention. |
Payroll Accuracy | Ensures correct salary deductions. |
Policy Enforcement | Standardized rules across the company. |
Key Features Overview
Feature | Benefit |
---|---|
Auto Deduction | Leaves auto-adjust with holidays/weekends. |
Policy Configurable | Enable/disable sandwich rule as needed. |
Seamless HR Integration | Works with Odoo 12 HR & Payroll. |
Transparency | Employees see exact leave counts in portal. |
Audit Ready | Consistent leave calculations for reports. |
How the Sandwich Rule Works

Image Source: odoo.com
The mechanism checks whether applied leaves cover holidays/weekends in between and extends leave count accordingly.
Step | Action |
---|---|
1 | Employee applies for leave (e.g., Friday & Monday). |
2 | System checks if holidays exist in between. |
3 | If yes, those days are added as leave. |
4 | Leave balance auto-adjusts. |
5 | Payroll reflects correct deduction. |
Configuration in Odoo 12
The Sandwich Rule can be configured within Leave Types and HR settings. Admins can enable or disable the rule as per company policy.
Configuration Step | Details |
---|---|
Navigate | HR Module → Configuration → Leaves |
Enable | Tick 'Apply Sandwich Rule' option |
Assign | Apply to specific leave types (Casual/Annual). |
Save | Activate rule for all employee requests. |
Examples of Leave Deduction
Leave Applied | Holiday in Between | Total Deducted |
---|---|---|
Friday + Monday | Saturday–Sunday | 4 days |
Wednesday + Friday | Thursday holiday | 3 days |
Thursday + Monday | Fri–Sun weekend | 5 days |

Simplify Leave Management with the Sandwich Rule in Odoo 12
Benefits for HR Teams
Benefit | Impact |
---|---|
Time Saving | No manual adjustments needed. |
Fair Policy | Same rules apply to all employees. |
Payroll Accuracy | Avoids salary disputes. |
Compliance | Supports standard HR frameworks. |
You Might Also Like
User Experience and UI
The feature integrates smoothly into the Odoo 12 leave management interface. Employees see real-time leave balances after applying.
UI Element | Benefit |
---|---|
Leave Calendar | Shows deducted days clearly. |
Portal View | Employees can self-check balances. |
HR Dashboard | Managers approve with policy applied. |
Reports | Leaves auto-calculated in analytics. |
Pricing and Availability
The Sandwich Rule is an Odoo 12 add-on app. Pricing may vary depending on vendor or custom development.
Platform | Availability | Cost |
---|---|---|
Odoo 12 CE | Supported | Paid (custom app) |
Odoo 12 EE | Supported | Paid (custom app) |
Other Versions | Requires adaptation | Depends on service |
Practical Use Cases
User Type | Usage |
---|---|
SMEs | Simplify leave and payroll automation. |
Corporate HR | Standardize holiday policies. |
Schools/Colleges | Apply sandwich rule for staff leaves. |
Remote Teams | Enforce rules across regions. |
Comparison with Default Leave Policy
Aspect | Default Odoo Leave | With Sandwich Rule |
---|---|---|
Holiday Count | Not included | Included automatically |
Payroll Accuracy | Manual adjustments needed | Fully automated |
Employee Transparency | Limited | Clear deduction display |
Policy Enforcement | Depends on HR | System-controlled |
Strengths and Drawbacks
Strengths | Limitations |
---|---|
Automates complex leave rules | Requires extra installation |
Transparent leave deductions | Not native in Odoo 12 by default |
Integrates with payroll | Company-specific policies may vary |
Who Should Use It?
User | Why Use It? |
---|---|
HR Managers | Save time on manual holiday checks. |
Organizations | Ensure fair and consistent leave rules. |
Employees | See accurate leave balance instantly. |
Payroll Teams | Reduce disputes and errors. |

Want to implement the Sandwich Rule in your Odoo HR system?
Getting Started
Step | What To Do |
---|---|
1 | Purchase or download the Odoo 12 Sandwich Rule app. |
2 | Install it via Apps module. |
3 | Enable Sandwich Rule under Leave Settings. |
4 | Test with sample leave applications. |
5 | Roll out to employees company-wide. |
FAQs
Q1: Is the Sandwich Rule built-in in Odoo 12?
A: No, it’s available as a custom/add-on app.
Q2: Can I apply the rule only for certain leave types?
A: Yes, HR can configure it per leave type.
Q3: Does it work with payroll?
A: Yes, deducted days are reflected in payroll calculations.
Q4: Can I disable the Sandwich Rule anytime?
A: Yes, admins can toggle the rule in leave settings.
Q5: Is it compatible with Odoo 13+?
A: With customization, it can be adapted for newer versions.