Odoo Help

Welcome!

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

2

Salary calculation on the basis of days the employees worked

By
Vijay M Nayani
on 11/28/13, 8:20 AM 4,560 views

I want to calculate the salary of the employees based on the number of days they worked. For eg if an employee works for 25 days, his salary for 5 days needs to eb deducted from his basic salary. how to do it??

See The bellow Answer bro

Mohan
on 8/31/16, 2:43 AM
1
Mohan
On 8/26/16, 5:55 AM

Change the Salary Rules/Basic Code -

The code is,

result = 0

for line in payslip.worked_days_line_ids:

result += line.number_of_days

if result >= 28:

result = 30

result = result*(contract.wage/30)

 

Note:

Go to the Salary Rules ---> Basic ---> Under the Computation ---> Click the Python Code option ---> Replace the New Code


Thanks & Regards,

Mohanraj J

(SrikeshInfotech)

1
Mike Telahun
On 11/29/13, 7:20 AM

Create a salary that multiplies the daily/hourly rate by the number of worked days/hours For example, assuming you have 26 working days in a month:

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

for slip in self.browse(cu, uid, ids, context=None): NameError: global name 'cu' is not defined

praveen
on 4/3/14, 8:49 AM

you should put "cr" not "cu"

Yassine TEIMI
on 7/9/15, 3:02 PM
0
inian
On 6/6/16, 2:59 AM

How to calculate hours based salary for employee?

please help me

0
Vijay M Nayani
On 11/29/13, 3:33 AM

please help me

Hi I am also looking for the same .....................

praveen
on 4/3/14, 8:49 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

4 follower(s)

Stats

Asked: 11/28/13, 8:20 AM
Seen: 4560 times
Last updated: 10/4/16, 3:28 AM