تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
6664 أدوات العرض

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 ..

الصورة الرمزية
إهمال
أفضل إجابة

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 ]]
الصورة الرمزية
إهمال
الكاتب

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.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
أغسطس 16
2955
2
مارس 15
7558
1
مارس 15
7180
0
مارس 15
3175
1
مارس 15
4686