Odoo Help


Getting error of dependencies while uninstalling / upgrading module..

Vitap ramdevputra
on 11/11/13, 9:32 AM 2,111 views

I want to add 3 fields in hr.contract model. Below is my code of all files I have written.


from openerp.osv import osv
from openerp.osv import fields
class contract_tag(osv.osv):
    #_name = 'hr.contract'
    _inherit = 'hr.contract'
    _columns = { 
    'x_tags' : fields.char('Tags',size=100),
    'vertical_id' : fields.char('Vertical id',size=25),
    'subvertical_id' : fields.char('Sub Vertical Id',size=25)


<?xml version="1.0" encoding="utf-8"?>
    <record model="ir.ui.view" id="contract">
        <field name="name">hr.contract.view.form</field>
        <field name="model">hr.contract</field>
        <field name="inherit_id" ref="hr_contract.hr_contract_view_form" />
        <field name="arch" type="xml">
            <xpath expr="/form/sheet/group/group/field[@name='type_id']" position="after">
            <field name= "x_tags" on_change='onchange_tags(x_tags)'/>
            <field name= "vertical_id"/>
            <field name= "subvertical_id"/>


    'name' : "contract tag",
    'version' : "0.0.17",
    'author' : "etl",
    'depends' : ['hr'],
    'category' : 'Tools',
    'update_xml' : ['add_tag.xml'],
    'data' : [],
    'demo' : [],
    'installable' : True,   

and in **__init__.py"

import contract_tag

For the first time module is installed successfully. But I am getting below error when I uninstall or updgrad my installed module.

File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 876, in create_instance
    'You may need to add a dependency on the parent class\' module.' % (name, parent_name))
TypeError: The model "hr.contract" specifies an unexisting parent class "hr.contract"
You may need to add a dependency on the parent class' module.

Please Help


Grover Menacho

--Grover Menacho--
| 5 7 8
La Paz, Bolivia
--Grover Menacho--

Odoo Developer

Grover Menacho
On 11/11/13, 10:41 AM

add hr_contract on __openerp__.py:

'depends' : ['hr','hr_contract'],

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

0 follower(s)


Asked: 11/11/13, 9:32 AM
Seen: 2111 times
Last updated: 3/16/15, 8:10 AM