This question has been flagged
4 Replies
6917 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. 

Avatar
Discard

Mohammed, please paste your error here!

Author

keyerror : 'hr.payslip'

Best Answer

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 !"]

Avatar
Discard
Best Answer

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

Avatar
Discard