Skip to Content
Menu
This question has been flagged
4 Replies
7369 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
Related Posts Replies Views Activity
1
May 21
2866
4
Oct 19
8647
1
Jan 18
7893
1
Feb 17
3902
0
Jan 17
3406