Skip to Content
Menu
This question has been flagged
1 Reply
3897 Views

Hi I'm new at odoo and I'm trying to create a salary rule that calculates the salary based on how many days a employee worked for that I need to be able to get the amount of days in the month. This is the code I have 

result = worked_days.WORK100.number_of_days * (contract.wage / 30)

the code is working the only problem is that not all the months have 30 days, I need to be able to get the amount of days in a month for the code to be completed  

Avatar
Discard
Author

Thank you for the links they were very usefull but how can I make those date imports in the salary rules code or how can I acces the .py file so I can make those imports?

Best Answer

Hello

You need to create other rules with others values, for example April give a rusult 30 ( days) 

Avatar
Discard