Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
4705 Представления


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!

Аватар
Отменить
Лучший ответ


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 !

Аватар
Отменить
Автор Лучший ответ

Thank you Jérémy.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
3
мар. 16
3994
0
сент. 18
3192
2
мар. 15
7153
0
мар. 25
1353
0
янв. 25
3440