Odoo Help


Module Reference is missing

Zakir Husain
on 9/15/14, 3:06 PM 676 views


            I am new to open erp development. I am working on Hr module. i want to use hr_salary_rule class of hr_payroll module in hr_employee class of hr modue for that i have change the _openerp_.py file of hr and added hr_payroll as depends module list. but still i am not able to use the hr_salary_rule class in hr_employee class. Do i need to do something else for that or i am missing something.

Thanks & Regards,

Yusuf ali



| 5 4 6
Zagreb | Karlovac, Croatia

there is only 10 kind of people the ones that understand binary ... and others

On 9/16/14, 3:43 AM

You got the first part right.. now

you need actual file for your code, let's call it hr_salary.py . 
next, you need to add import hr_salary  in __init__.py of your module 

Now you are ready to inherit the class hr_employee, in hr_salary.py start with:

class hr_salary_rule(osv.Model):
     _inherit = "hr.salary.rule"
     # the rest of your class code goes here

After you have done coding, save your file, and restart openerp service...

hope it helps...



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 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

Question tools

1 follower(s)


Asked: 9/15/14, 3:06 PM
Seen: 676 times
Last updated: 3/16/15, 8:10 AM