Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4346 Vizualizări

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
Imagine profil
Abandonează
Cel mai bun răspuns

replace appointment.id with rd.id

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
mar. 15
5586
name_get Rezolvat
2
iul. 24
11564
0
mar. 15
5026
1
feb. 25
3995
1
ian. 24
1785