Skip to Content
Menú
This question has been flagged

Hello everybody, I would like get the ID of each value inside a many2many field for the function create(), I'm using the following syntax

 instalaciones_usadas = values['x_instalaciones_usadas']

for i in instalaciones_usadas:

    aux = i.id


But I get a error: List has no attribute 'id', anyone could help me? Thanks!!


Avatar
Descartar
Autor

I did a UserError with the string of i making str(i[0]) and I always get "6" and I don't know why

Related Posts Respostes Vistes Activitat
4
de març 15
33151
1
d’ag. 21
3305
1
de nov. 19
7096
1
de des. 17
6475
1
d’ag. 17
5771