Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2549 Vizualizări

How to fetch one2many values in excel report  ?

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

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)

Autor

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

Related Posts Răspunsuri Vizualizări Activitate
1
iul. 22
2776
0
iul. 21
2048
1
apr. 23
11553
0
nov. 22
2899
0
sept. 21
2432