콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2062 화면

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

see the updated answer

관련 게시물 답글 화면 활동
1
7월 22
2282
0
7월 21
1602
1
4월 23
11015
0
11월 22
2386
0
9월 21
2030