Skip to Content
Menú
This question has been flagged
2 Respostes
4561 Vistes


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.


Thanks!

Avatar
Descartar
Best Answer


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 !

Avatar
Descartar
Autor Best Answer

Thank you Jérémy.

Avatar
Descartar
Related Posts Respostes Vistes Activitat
3
de març 16
3734
0
de set. 18
3060
2
de març 15
6985
0
de març 25
1176
0
de gen. 25
3222