Skip to Content
Menú
This question has been flagged
1 Respondre
5373 Vistes

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
Descartar
Autor

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
Descartar
Related Posts Respostes Vistes Activitat
1
de set. 25
244
1
de maig 25
1389
1
de març 25
1326
0
de febr. 25
1607
1
de des. 24
1967