Odoo Help

0

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

By
amr negm
on 1/22/15, 10:45 AM 1,341 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.

0
zarzarsan
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:

result=-(contract.wage/30)*worked_days.Unpaid.number_of_days

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

Use the following code to get the unpaid leaves deductions. 
result=-(contract.wage/31)*worked_days.Unpaid.number_of_days

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.

Register

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)

Stats

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