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

Hi all,

I'm trying to insert a column into addons/purchase/report/order.rml so that every line of the purchase order starts with a consecutive number.

The trouble is that the report uses data from the database and these numbers are neither there nor shall be there. The only sensible thing to to would be to generate these numbers on the fly for every report.

I tried to do this in the RML file itself but this does not work. It seems that the code executed between the square brackets is local for this execution - I cannot define a "global" variable, increment it and print it's value on each row. I searched the internet but cannot seem to found an answer. How shall I go about this problem?

Thanks in advance!

아바타
취소

hi

create your function in order.py and called in rml

작성자

Hi, thank you for the quick answer! I have some difficulties implementing it though. I tried to add the free function to addons/purchase/report/order.py as well to addons/purchase/report/purchase_report.py to no avail. Can you please point me to an example of calling such a self-made function in RML? Thanks!

관련 게시물 답글 화면 활동
3
7월 24
8812
0
4월 17
3519
1
4월 17
4800
2
11월 15
5217
0
3월 15
5005