Odoo Help

1 Answer
Grethell Garcia
1/25/18, 1:40 AM


I finally solved my problem, after read all the code of the payslip model.

The payslip object used in the salary rule has a env variable reference, so the correct way to call a function of other model class is below (according to my example):

result = payslip.env['hr.payslip'].salaryfunction()

The payslip object used inner the salary rule is not the same as the hr.payslip model class.

I hope this works to another dude

Ask a Question
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.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now