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

How to fetch one2many values in excel report  ?

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

If you have a record set, lets say object, then you can access one2many field value using object.field_name, as it is one2many field, iterate the result over a for loop, to get the value from each lines.


UPDT:

row = col = 0

for line in obj.moce_raw_ids

    sheet.write(row, col, line.name, bold)
    row += 1

Thanks & Regards

الصورة الرمزية
إهمال
الكاتب

sheet.write(0, 0, obj.move_raw_ids.product_id.name, bold)
i add it like that and i think it works, but i get this error
ValueError: Expected singleton: product.product(2, 3, 4)

الكاتب

i this the error raised because i did't iterate using for loop,
but i'm wondering how to do it in excel report

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 22
2765
0
يوليو 21
2042
1
أبريل 23
11535
0
نوفمبر 22
2885
0
سبتمبر 21
2427