Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
5329 Vistas

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

Mejor respuesta

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

this is the correct python code

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
may 25
1233
1
mar 25
1276
0
feb 25
1510
1
dic 24
1914
0
nov 24
108