It is currently Mon May 21, 2012 6:13 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: inherit
PostPosted: Thu Apr 14, 2011 6:58 am 
Offline

Joined: Wed Feb 16, 2011 1:41 pm
Posts: 11
i try to inherit module res.partner.contact on my own module call CMS, but I got this error message
Code:
ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/addons/__init__.py", line 717, in load_module_graph
    modules = pool.instanciate(package.name, cr)
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/osv/osv.py", line 258, in instanciate
    res.append(klass.createInstance(self, module, cr))
  File "/home/eiji/Openerp/openerp-server-6.0.2/bin/osv/osv.py", line 331, in createInstance
    assert pool.get(parent_name), "parent class %s does not exist in module %s !" % (parent_name, module)
AssertionError: parent class res.partner.contact does not exist in module cms !



Can someone help me pliss.... :roll: :roll:


Top
 Profile  
 
 Post subject: Re: inherit
PostPosted: Thu Apr 14, 2011 9:19 am 
Offline

Joined: Mon Apr 11, 2011 7:49 pm
Posts: 17
Location: Australia
eiji,

oop's my bad :oops:
Try, ( base.res.partner.contact )

GEM is totally right
Quote:
search the class you need to inherit in addons\base\res\partner.py, I think you need res.partner.address and not contact, you can know by regarding the view you modified also in partner_view.xml.


8)


Last edited by vitridex on Thu Apr 14, 2011 2:17 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: inherit
PostPosted: Thu Apr 14, 2011 12:45 pm 
Offline

Joined: Wed Feb 16, 2011 1:41 pm
Posts: 11
Still wont work
:cry: :cry:


Top
 Profile  
 
 Post subject: Re: inherit
PostPosted: Thu Apr 14, 2011 1:44 pm 
Offline

Joined: Fri Nov 21, 2008 9:56 am
Posts: 3079
Location: Lotharingie
search the class you need to inherit in addons\base\res\partner.py, I think you need res.partner.address and not contact, you can know by regarding the view you modified also in partner_view.xml.


Top
 Profile  
 
 Post subject: Re: inherit
PostPosted: Fri Apr 15, 2011 6:36 am 
Offline

Joined: Wed Feb 16, 2011 1:41 pm
Posts: 11
GEM wrote:
search the class you need to inherit in addons\base\res\partner.py, I think you need res.partner.address and not contact, you can know by regarding the view you modified also in partner_view.xml.

I'm really nob, :lol: :lol:
Newbie problems..


It's works now. Thx a lot GEM.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP