İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
2535 Görünümler

How to fetch one2many values in excel report  ?

Avatar
Vazgeç
En İyi Yanıt

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

Avatar
Vazgeç
Üretici

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)

Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Tem 22
2764
0
Tem 21
2040
1
Nis 23
11533
0
Kas 22
2881
0
Eyl 21
2427