Odoo Aide


1 Answer
Grethell Garcia
25/01/2018 01:40


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

Poser une question
Keep Informed
1 Abonné(e)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