Odoo Help


Error in Inheritance!!!

aci aisha
on 1/30/15, 5:29 AM 555 views

I perform inheritance as follows,

class trademark_file_details(osv.osv):

    _description = 'Trademark File'

    _name = 'trademark.file.details'
    _inherit = 'file.details'

    _columns = {
                'trademark' : fields.char('This file is', required=True),
    _defaults = {
        'name': 'Trademark',


But error occured,,

    'You may need to add a dependency on the parent class\' module.' % (name, parent))
TypeError: The model "trademark.file.details" specifies an unexisting parent class "file.details"
You may need to add a dependency on the parent class' module.

ANY1 can solve it???

from where u call this parent class file.details or ,R u using any existing module .Error is from file.details .So u must mentioned this dependancy class in openerp.py file

on 1/30/15, 5:34 AM

dependency module

on 1/30/15, 5:35 AM

Both are in same class LIBU

aci aisha
on 1/30/15, 6:14 AM

Both are in same class LIBU

aci aisha
on 1/30/15, 6:14 AM
On 1/30/15, 6:09 AM

In the folder of your custom module, locate the __openerp__.py file ( for odoo8 it might be __odoo__.py).

Edit that file and locate the rule that starts with "depends". There between the [brackets] add "file".

Odoo needs to be told on what you depend to run your module, so for every inherit you do, make sure you add this to depends in the above named file.

but i use this two classes in a single module SonnyV

aci aisha
on 1/30/15, 6:15 AM

The rule that starts with depends is formed as a list. Say you inherit from file and account and sale. "depends" : ['file', 'account', 'sale']

Cats&Dogs bvba, SonnyV
on 1/30/15, 6:22 AM

SonnyV,,, I inherit a class named file.details from the module file_details in the same module.....both are in same module,,,,no more than 1 module for dependence,,,,,!!!!!

aci aisha
on 1/30/15, 6:26 AM

Have you put all the necessary files into the __init__.py? Also, sequence is important because you need to have file.details to be instantiated first before trademark.file.details.

on 1/30/15, 11:40 AM

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: 1/30/15, 5:29 AM
Seen: 555 times
Last updated: 3/16/15, 8:10 AM