Odoo Help

2

0
2 Answers
0
Avatar

Sudhir Arya (ERP Harbor Consulting Services) India

--Sudhir Arya (ERP Harbor Consulting Services)--
27218
| 8 9 10
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & CTO at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert having 7+ years of Experience in Odoo ERP.

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Good knowledge and experience in payment gateway integration with Odoo

• Active Memeber on Stackoverflow 

LinkedIn

Blog

Stackoverflow

ERP Harbor Consulting Services

Skype:sudhir@erpharbor.com
Website: http://www.erpharbor.com
Sudhir Arya (ERP Harbor Consulting Services) India
9/23/19, 2:23 AM

I am not sure what is wrong with your condition, but I can guide you how to figure it out.

Go to "hr_payroll / models / hr_payroll.py" and search for "def compute_rule" method. Now comment out the try and except part and try to compute the payslip again. You would see original error causing the issue which could help you to fix that.

0
Avatar

Jithin India

--Jithin--
--Jithin--



Jithin India
9/24/19, 3:47 AM

Condition: result = employee.gender == "female".

You are assigning a comparison to 'result' variable, which is not proper. result variable contains an amount to show in payslip.

3 Comments
Sudhir Arya (ERP Harbor Consulting Services) India
9/24/19, 4:43 AM

He is trying to add the code in the python condition field and not in the python code field. You are right result should have amount value but it is for python code and not for python condition.

Jithin India
9/24/19, 6:10 AM

Yes you are correct , ididn't notice condition field

SSS India
9/24/19, 8:01 AM

Yes..@Sudhir Arya I am write code in python condition field, not in python code field. But after some try my code work properly. Thanks to you and @Jithin for time and suggestion

On 24/09/19 2:17 PM, Sudhir Arya (ERP Harbor Consulting Services) wrote:

He is trying to add the code in the python condition field and not in the python code field. You are right result should have amount value but it is for python code and not for python condition.

Sent by Odoo S.A. using Odoo.

Ask a Question
Writer
Keep Informed
1 follower(s)
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