跳至内容
菜单
此问题已终结
1 回复
3534 查看

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
形象
丢弃
最佳答案

replace appointment.id with rd.id

形象
丢弃
相关帖文 回复 查看 活动
0
3月 15
4712
name_get 已解决
2
7月 24
8049
0
3月 15
4122
1
2月 25
2973
1
1月 24
854