Community mailing list archives

Re: Payslips

Projetgrup, Levent Karakaş
- 08/04/2015 09:16:18
1) Add a rule to calculate daily rate (DAILY_RATE) with python code like this:

result = employee.wage / 30

2) then you will need to add another rule and use this to count total number of days (WORKED_DAYS) worked like this:

result = 0 for line in payslip.worked_days_line_ids: result += line.number_of_days if result >= 28: result = 30

odoo automatically decrements leaves from work days (WORK100.days), but unfortunately weekends are not counted here. we added another automatically computed entry here for weekends with python code.

3) finally add another rule to calculate the wage:


2015-08-04 15:42 GMT+03:00 Iman Ahmad <>:

I want to generate payslips which takes the total wage and divide it to 30 and then multiply it by the number of days the employee work (which are equal to 30- leaves )

how can i achieve this 

any help ?

Best Regards
Iman Ahmad
Minerva Data Pty .Ltd.
P.O.BOX 4356, Geelong, VIC 3220, Australia

Post to: