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.

0

Error! Wrong python condition defined for salary rule

By
sridhar
on 5/6/13, 5:27 AM 3,788 views

Hi all, i creating a salary slip for a every employee that will check the leave history, how many days leaves taken by the employee, i put Unpaid Rule "result=-(contract.wage/31)*worked_days.Unpaid.number_of_days", it defined for every employee, but employee didn't take leave means "Error! Wrong python condition defined for salary rule LOP (LOP)." i need a proper solution for this code. help me.

the bellow answer will solve your problem .. you just need a condition for the rule

Maath
on 5/11/13, 8:59 AM
4

Sandeep

--Sandeep--
6083
| 6 5 8
Delhi, India
--Sandeep--
Python OpenERP Developer http://in.linkedin.com/pub/sandeep-rana/3b/a16/786/
Sandeep
On 5/6/13, 5:38 AM

Hi Mr.Sridhar

"result=-(contract.wage/31)*worked_days.Unpaid.number_of_days"

wrong python code means you added "Unpaid" there in rule

just add result=-(contract.wage/31)*worked_days.number_of_days

Unpaid is not a field of worked_days (object)

i understand but Unpaid amount didn't calculate it has problem.

sridhar
on 5/6/13, 6:14 AM

How can we deduct unpaid leave amount from the basic salary of Employee? Plz tell me the python code for that.
I think the above mention code is for calculating the Salary on the basis of number of days worked by employee.

Raminder Pal Singh
on 5/9/13, 3:32 AM

No... see salary Computation, that amount is deduct there.

sridhar
on 5/9/13, 4:09 AM

got it.. thanks.. we have to change the sequence number for that.

Thanks

Raminder Pal Singh
on 5/9/13, 5:23 AM

I have added the solution for this question and the problem solved

Maath
on 5/11/13, 8:54 AM

Hi @Sandeep , in development , how can I put new type of hourly leave and take the total hours and use it in payslip ?

Maath
on 1/28/14, 8:50 AM
0
Maath
On 5/11/13, 8:57 AM

This problem has solved at This Link

0
trinath
On 5/23/14, 7:34 AM

Hi Sandeep,Can you please tell me how to configure the unpaid leaes in hre module on openerp7 .i have made the salary rule as of the explanation "result=-(contract.wage/31)*worked_days.number_of_days"

but its not showing up in the payslip when i clicks on computation

button

help me on this aspect through

Email :seeramt@sify.com         orelse

skype : seeramt1

 

 

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

1 follower(s)

Stats

Asked: 5/6/13, 5:27 AM
Seen: 3788 times
Last updated: 3/16/15, 8:10 AM