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

Am trying to enhance my open office report data with few more additional data. But am not able to access the nested referenced table values in to my report

Eg:- I want to show following columns [ Product Name , Description , Quantity , Unit Price , subtotal] in my purchase order report (open office) , but as of now in default template there is no option to see the Product Name. How can i add that information in to the report.

Table reference goes like this : purchase_order_line(pruduct_id) -> product_product(product_tmpl_id) -> product_template

Issue :- I wand to fetch the name field of product_template table in to my report.

Reference :- current report has loop starts like as follows ,

[[repeatIn(o.order_line,'line')]]

[[ line.name ]] --> this field just gives description from the purchase_order_line table

Any hint point to the answer is highly appreciated.. Thanks in advance ..

Avatar
Zrušit
Nejlepší odpověď

Hi Nishad,

You can fetch product name by

[[repeatIn(o.order_line,'line')]]
[[ line.name ]]
Product Name - [[ line.product_id.name ]]

You can also fetch product template id by

[[repeatIn(o.order_line,'line')]]
[[ line.name ]]
Product Template Name - [[ line.product_id.product_tmpl_id.name ]]
Avatar
Zrušit
Autor

Thanks ...Yes it works fine.... There is an alternate way to cross check this . Check whether the field names are exactly identified by the rml file generated from this .sxw file or not ie After modification in openoffice doc just export that to rml , there if you find any spaces in between the fields then the report won't generate as you wish.

Yes Nishad. That unwanted spaces caused a real disaster at initial stage. After converting the report if it is not converted it is better to change directly in rml instead doing change in sxw & again converting in rml. Thanks for suggestion.

Hi Guys, I'm facing a problem with this.....I've a custom module with multiple line items from another module., in my report i need to display some info from my custom module and will have a table containing the line items on the report. I'm using both the loops exactly the same way as mentioned above by Keyur, but when i send it to server and click on print to generate PDF, i'm getting a NameError, name 'o' is not defined. Please help me :)

You need to specify [[ repeatIn(objects,'o') ]] in you report.sxw file.

Related Posts Odpovědi Zobrazení Aktivita
1
srp 16
3494
2
bře 15
8138
1
bře 15
7785
0
bře 15
3679
1
bře 15
5389