Odoo Help

Welcome!

This community 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.

0

Unexisting parent class Crm.case

By
Sandro Regis
on 3/28/13, 2:00 PM 1,560 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

0

AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
2060
| 4 5 8
Bronx, United States
--AJ Schrafel Paper Corp--

Exploring OpenERP for business

AJ Schrafel Paper Corp
On 3/28/13, 4:04 PM

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.

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

Sandro Regis
on 3/28/13, 4:41 PM
0
Sandro Regis
On 3/28/13, 6:12 PM

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!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/28/13, 2:00 PM
Seen: 1560 times
Last updated: 3/16/15, 8:10 AM