Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5311 มุมมอง

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


อวตาร
ละทิ้ง
ผู้เขียน

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 ตอบกลับ มุมมอง กิจกรรม
4
มี.ค. 15
33304
1
ส.ค. 21
3379
1
พ.ย. 19
7227
1
ธ.ค. 17
6597
1
ส.ค. 17
5864