Odoo Help


How to calculate/differentiate paid/unpaid leave types in salary rules?

amr negm
on 1/22/15, 10:45 AM 1,639 views

I am adding new deduction salary rules. I want to consider leaves in 'hr.holidays', and 'resource.calendar.leaves' models. However, I can't decide whether to deduce salary based on some leave record. I have no clear way to know whether it is a paid or non-paid leave.

On 3/24/16, 7:50 AM

Use the following code in Python Expression:

result=worked_days.Unpaid and worked_days.Unpaid.number_of_days or False

and them add the following code in Python Code:


Shahid M
On 12/16/15, 8:56 AM

Use the following code to get the unpaid leaves deductions. 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/22/15, 10:45 AM
Seen: 1639 times
Last updated: 3/24/16, 7:50 AM