Skip to Content
Menu
This question has been flagged
1 Reply
5366 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 

 

Avatar
Discard
Author

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

Best Answer

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

this is the correct python code

Avatar
Discard
Related Posts Replies Views Activity
0
Aug 25
127
1
May 25
1329
1
Mar 25
1301
0
Feb 25
1563
1
Dec 24
1944