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
5967 Zobrazení

First,  thank you Serpent CS for upgrading jasper_reports to work with Odoo 8.

https://github.com/JayVora-SerpentCS/Jasperv8

It works nicely. Except 1 thing, on Sales Order form, it does not disply order lines. I found that despite we have declare, as example, OPENERP_RELATIONS = ["order_line"], as we want to loop through Sales Order's Lines. It still display only the 1st line.

After dig through code, I found the problem in /jasper_reports/JasperReports/BrowseDataGenerator.py -> in the method def generateIds(.....)

Following part of code think "order_line" is not a list (in v8 order_line is recordset), and so it just give log warning and ignore it. 

                if not isinstance(value, list):

                    self.warning("Field '%s' in model '%s' is not a relation." % (root, self.model))

                    return currentRecords

My solution is just comment this part out. And now it works !!!

Avatar
Zrušit

Hi Kitti, Can you tell me how to declare the jasper report in xml? I hope the syntax is different from v7. It will be useful for many including me

Hi Vivek,

Here is how I did.

<!-- Quotation -->
<record id="nstda_msd_quotation" model="ir.actions.report.xml">
<field name="string">Quotation</field>
<field name="auto">True</field>
<field name="model">sale.order</field>
<field name="jasper_model_id" ref="sale.model_sale_order"/>
<field name="name">Quotation</field>
<field name="report_name">nstda.msd.quotation</field>
<field name="report_rml">nstda_msd_report/jrxml_reports/nstda_msd_quotation.jrxml</field>
<field name="menu">True</field>
<field name="header">False</field>
<field name="jasper_report">True</field>
<field name="jasper_output">pdf</field>
</record>
<record id="nstda_msd_quotation_values" model="ir.values">
<field name="name">Quotation</field>
<field name="model">sale.order</field>
<field name="key2" eval="'client_print_multi'" />
<field name="value_unpickle" eval="'ir.actions.report.xml, ' +str(nstda_msd_quotation)" />
</record>


Kitti

On Tue, Oct 27, 2015 at 7:55 PM, Vivekrajan <vivek-bics-gmail-com@mail.odoo.com> wrote:

Hi Kitti, Can you tell me how to declare the jasper report in xml? I hope the syntax is different from v7. It will be useful for many including me

--
Vivekrajan



--
Mobile: +66-(0)8-1841-7480
Your ERP Partner => www.ecosoft.co.th
Nejlepší odpověď

thank you!!!

Avatar
Zrušit