Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
5272 Visualizações

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
Cancelar
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

Publicações relacionadas Respostas Visualizações Atividade
4
mar. 15
33176
1
ago. 21
3325
1
nov. 19
7146
1
dez. 17
6501
1
ago. 17
5797