Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I need to add total number of days of month (30 or 31) in a salary rule python code . How can i do that? result=-(contract.wage/30)*worked_days.Unpaid.number_of_days
You want to create a working schedule for each employee.
Human resource->Contract->working schedule
Then automatically get the total no.of days for each employee.
datej = str(payslip.date_to)
datek = str(payslip.date_from)
dj = datej[-2:]
new = 0
if str(x) == dj or "0"+str(x) == dj:
dk = datek[-2:]
old = 0
if str(y) == dk or "0"+str(y) == dk:
no_of_days = new-old + 1
result = no_of_days
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/3/13, 7:08 AM|
|Seen: 4036 times|
|Last updated: 3/16/15, 8:10 AM|