Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4482 Tampilan

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
Avatar
Buang
Jawaban Terbai

replace appointment.id with rd.id

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Mar 15
5727
name_get Diselesaikan
2
Jul 24
12040
0
Mar 15
5125
1
Feb 25
4130
1
Jan 24
1879