تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
5265 أدوات العرض

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
4
مارس 15
33170
1
أغسطس 21
3320
1
نوفمبر 19
7143
1
ديسمبر 17
6486
1
أغسطس 17
5790