Odoo Help


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

Mohammed Khamis
on 7/1/15, 3:56 AM 1,456 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
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. 



Odoo Police ["Justice for all !"]

On 7/7/15, 5:26 AM

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

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