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

How to solve this error KeyError: 'hr.payslip'?

By
Mohammed Khamis
on 7/1/15, 3:56 AM 810 views

When I upgrade my custom module , this module has object inherit from hr.payslip . this object when my module upgrade the the error raised from registry module from __getitem__ function ?

How to solve this error. 

Mohammed, please paste your error here!

Serpent Consulting Services Pvt. Ltd.
on 7/2/15, 6:32 AM

keyerror : 'hr.payslip'

Mohammed Khamis
on 7/7/15, 5:36 AM
0
Odoo Police
On 7/7/15, 5:43 AM

Hello Mohammed,

You just need to add the module as in dependency of your __openerp__.py file in which "hr.payslip" class is defined.  For example, hr.payslip is defined in hr_payroll module. So you need to add "hr_payroll" in "depends" key in your __openerp__.py file like as follows,

'depends': ["hr_payroll"]

Tips : When you inherit any model, you must need to add the module in which that model is defined as inside dependency in your module. 

--

Regards

Odoo Police ["Justice for all !"]

0
Dairidi
On 7/7/15, 5:26 AM

Do you have depends hr.payslip in openerp.py? Maybe could solve this problem.

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: 7/1/15, 3:56 AM
Seen: 810 times
Last updated: 7/7/15, 5:46 AM