Odoo Help


Error using builtin function in crm_lead from custom module

on 8/31/15, 11:48 AM 732 views

maybe someone can explain me meaning of this error:

File "/opt/odoo/openerp/api.py", line 715, in __new__

self.registry = RegistryManager.get(cr.dbname)

AttributeError: 'crm.lead' object has no attribute 'dbname'

from my module i call other function from inherited class

my code

class crm_lead(models.Model):

_inherit = 'crm.lead'

def custom_create_contact(self, cr, uid, ids, context=None):

res = self.handle_partner_assignation(self, cr, uid, ids)

return res

I am calling this function with button from lead form.



res = self.handle_partner_assignation(cr, uid, ids)

Error is because, self.dbname doesn't exists !

self is the object which call the method! Don't need to pass the parameter again !

On 8/31/15, 4:46 PM

Thank you Jérémy.

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: 8/31/15, 11:48 AM
Seen: 732 times
Last updated: 9/2/15, 2:54 AM