İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4115 Görünümler

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
Vazgeç
En İyi Yanıt

replace appointment.id with rd.id

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
0
Mar 15
5271
name_get Çözüldü
2
Tem 24
10125
0
Mar 15
4713
1
Şub 25
3681
1
Oca 24
1491