This question has been flagged
2 Replies
4532 Views

Hello, I try to install the project_crm module and got this dump:

'You may need to add a dependency on the parent class\' module.' % (name, parent_name))

TypeError: The model "crm.case" specifies an unexisting parent class "crm.case" You may need to add a dependency on the parent class' module.

Looking at __terp__.py whe have this entry

"depends" : ["base","crm","project","crm"],

Looking at project_crm.wizard.wizard_unsync.py we have this reference entry:

class wizard_unsync(wizard.interface):
 ....
 def delete(self,cr, uid,data,context):
    for project in pooler.get_pool(cr.dbname).get('project.task').browse(cr, uid, data['ids']):
        if project.case_id:
            '''Right this line below'''
            pooler.get_pool(cr.dbname).get('crm.case').unlink(cr, uid, [project.case_id.id], context)
    return {}

And finally under project.crm.project_crm.py we find the class declared like this:

class crm_case(osv.osv):
_inherit = "crm.case"
def write(self, cr, uid, ids,vals,context={}):
    res = super(crm_case,self).write(cr, uid, ids, vals, context)
    date = vals.get('date',False)
    if date:
        for case in self.browse(cr, uid, ids, context):
            prj_ids = self.pool.get('project.task').search(cr, uid, [('case_id', '=', case.id)])
            for project_id in prj_ids:
                cr.execute("update project_task set date_deadline = '%s' where id = %d " %(date,project_id))
    return res

I don`t saw in anywhere the calling to create the entity crm_case on my schema.

So, humbly i ask to you friends why ORM throws that error message and how should i fix it?

Note: For now i am learning how to deal with OpenERP framework, once i have more experience promisse to help other friends.

Regards,

Sandro Regis

Avatar
Discard
Best Answer

What version are you using? __terp__.py is for V5 and below. If you are attempting to install a module with __terp__.py into V7 it may have to be rewritten to be compatible.

Avatar
Discard
Author

I am using 6.1 version. Even in this version there are some modules using __terp__.py

Author Best Answer

Okay fellows!

It`s solved. I just download from repository the crm_case module and did some fixes, removing the

<fieldname="probability"/>

from views and on dependencies for project_crm module was added crm_case module.

So it works! Thank you all!

Avatar
Discard