Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2560 Visualizzazioni

How to fetch one2many values in excel report  ?

Avatar
Abbandona
Risposta migliore

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
Abbandona
Autore

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)

Autore

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

Post correlati Risposte Visualizzazioni Attività
1
lug 22
2793
0
lug 21
2070
1
apr 23
11594
0
nov 22
2927
0
set 21
2458