Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4660 Visualizzazioni


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
Abbandona
Risposta migliore


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
Abbandona
Autore Risposta migliore

Thank you Jérémy.

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
mar 16
3961
0
set 18
3178
2
mar 15
7125
0
mar 25
1336
0
gen 25
3427