Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
4720 Weergaven


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
Annuleer
Beste antwoord


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
Annuleer
Auteur Beste antwoord

Thank you Jérémy.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
mrt. 16
4021
0
sep. 18
3201
2
mrt. 15
7182
0
mrt. 25
1420
0
jan. 25
3499