Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
4099 Widoki

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
Awatar
Odrzuć
Najlepsza odpowiedź

replace appointment.id with rd.id

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
mar 15
5241
name_get Rozwiązane
2
lip 24
10038
0
mar 15
4687
1
lut 25
3643
1
sty 24
1455