Ir al contenido
Menú
Se marcó esta pregunta

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.

Avatar
Descartar
Mejor respuesta

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

Avatar
Descartar
Mejor respuesta

Use the following code to get the unpaid leaves deductions. 
result=-(contract.wage/31)*worked_days.Unpaid.number_of_days

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
ago 21
2016
0
ene 17
3937
0
sept 16
3812
2
mar 15
4993
0
mar 15
3418