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

i've created a module named "appointement" that have as fields -start-datetime- finish-datetime ... 

but when i try to overide the function name_get i got this error "AttributeError: type object 'appointment' has no attribute 'id'"

@api.multi
def name_get(self):
result=[]
for rd in self:
name=rd.sujet+' faite par :'+rd.agent_id.name
result.append((appointment.id,name))
return result
Аватар
Отменить
Лучший ответ

replace appointment.id with rd.id

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мар. 15
5327
name_get Решено
2
июл. 24
10459
0
мар. 15
4773
1
февр. 25
3763
1
янв. 24
1552