Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
4510 Zobrazení


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
Zrušit
Nejlepší odpověď


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
Zrušit
Autor Nejlepší odpověď

Thank you Jérémy.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
3
bře 16
3646
0
zář 18
3039
2
bře 15
6965
0
bře 25
1121
0
led 25
3164