Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
4141 Prikazi

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
Opusti
Best Answer

replace appointment.id with rd.id

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
mar. 15
5302
name_get Solved
2
jul. 24
10338
0
mar. 15
4731
1
feb. 25
3733
1
jan. 24
1538