跳至內容
選單
此問題已被標幟
1 回覆
2250 瀏覽次數

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
7月 22
2486
0
7月 21
1806
1
4月 23
11244
0
11月 22
2497
0
9月 21
2210