Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4151 Vistas

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
Descartar
Mejor respuesta

replace appointment.id with rd.id

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
mar 15
5319
name_get Resuelto
2
jul 24
10433
0
mar 15
4761
1
feb 25
3759
1
ene 24
1546