跳至內容
選單
此問題已被標幟
1 回覆
4168 瀏覽次數

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
5353
name_get 已解決
2
7月 24
10590
0
3月 15
4796
1
2月 25
3808
1
1月 24
1585