Odoo Help

Welcome!

This community 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.

0

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

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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