Odoo Help


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.


How to deduct salary from unpaid leaves

on 11/17/14, 6:23 AM 824 views

Hi , im new to odoo . Trying to explore payroll module , having difficulty in deducting salary while generating payslips

So far i have created salary rule "Unpaid leave" with code "UL" , its python code is 

result=-(contract.wage / 22)*(worked_days.no_of_days)

I have also approved unpaid leaves for an employee , when i try to compute payslip for that employee for the same month on which the leaves were approved , Unpaid Leave gives me amount zero . Am i missing something ...  Help would be appreciated 


It works when i hard code the value against "worked_days.no_of_days" . Somehow its not getting value of worked_days.no_of_days ...

on 11/17/14, 7:12 AM

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

2 follower(s)


Asked: 11/17/14, 6:23 AM
Seen: 824 times
Last updated: 3/16/15, 8:10 AM