Hi,
Overtime can be added to basic salary by Odoo in the settings of working type but is it possible to have overtime has a separate line, maybe through a salary rule.
In Ghana, Overtime is taxed differently than basic salary so it cannot be added and needs to be treated separately.
Thank you,
Patrick
Yes, create a separate salary rule for overtime. Do NOT use the working type method – that combines overtime with basic salary.
How to do it:
Go to Payroll → Configuration → Salary Rules
Create a new rule with category Allowance
Use Python condition: result = worked_days.OVERTIME.number_of_hours > 0
Use Python computation: result = worked_days.OVERTIME.number_of_hours * contract.hourly_wage * 1.5
Add this rule to your salary structure
The overtime will then appear as its own line on the payslip, completely separate from basic salary, allowing different tax calculations for Ghana.
I did but:
The result:
Please help.
Patrick
Hello,
Can you elaborate more with example , so I can help your regrading this.
I've try to reproduce but didn't get any error.. Can you give steps you follow so I can double check? With odoo version
I created a salary rule for overtime so that it does not get combined with the Basic salary rule in the salary calculation. In Ghana, overtime is treated separately because it has a separate taxing scheme.
I follow the instructions but I still have an invalid operation when I try to compute. It seems to be an attribute error with OVERTIME itself.