Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
5521 Zobrazení

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!

Avatar
Zrušit

hi

create your function in order.py and called in rml

Autor

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!

Related Posts Odpovědi Zobrazení Aktivita
3
čvc 24
8812
0
dub 17
3519
1
dub 17
4801
2
lis 15
5217
0
bře 15
5007