Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
4508 Vistas


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
Mejor respuesta


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 Mejor respuesta

Thank you Jérémy.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
mar 16
3646
0
sept 18
3038
2
mar 15
6964
0
mar 25
1112
0
ene 25
3162