Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
4344 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
5584
name_get Solved
2
jul. 24
11530
0
mar. 15
5024
1
feb. 25
3994
1
jan. 24
1782