Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4097 Zobrazení

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
Zrušit
Nejlepší odpověď

replace appointment.id with rd.id

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
bře 15
5238
name_get Vyřešeno
2
čvc 24
10032
0
bře 15
4684
1
úno 25
3638
1
led 24
1453