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

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
Abbandona

hi

create your function in order.py and called in rml

Autore

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!

Post correlati Risposte Visualizzazioni Attività
3
lug 24
8853
0
apr 17
3539
1
apr 17
4816
2
nov 15
5241
0
mar 15
5039