Skip to Content
Menu
This question has been flagged
1 Reply
3456 Views

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

replace appointment.id with rd.id

Avatar
Discard
Related Posts Replies Views Activity
0
Mar 15
4562
name_get Solved
2
Jul 24
7409
0
Mar 15
4057
1
Feb 25
2851
1
Jan 24
763