Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4053 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
5188
name_get Resuelto
2
jul 24
9866
0
mar 15
4649
1
feb 25
3573
1
ene 24
1386