Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4098 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
5241
name_get Diselesaikan
2
Jul 24
10038
0
Mar 15
4686
1
Feb 25
3642
1
Jan 24
1454