Skip to Content
Menu
This question has been flagged
2 Replies
4528 Views

I created the report, taking the following steps, as stated in the tutorial (I also created the module from the tutorial and there the report works):

- reports.xml in the data list

- added code in reports.xml:

<openerp>

    <data>

        <report

        id="report_idtest"        

        model="pprepair.ppmain"    

        string="Ppreport"

        report_type="qweb-pdf"

        name="pprepair.report_idtest_name"    

        />


        <template id="report_idtest_name">    

            <t t-call="report.html_container">

                <t t-foreach="docs" t-as="o">

                    <t t-call="report.external_layout">

                        <div class="page">

                            <h2>Report title</h2>

                        </div>

                 </t>

            </t>

         </t>

        </template>

    </data>

</openerp>

thats it. when I change the attribute "name" to the value of "pprepair.report_idtest_name", I get error with "QWebTemplateNotFound" and when I change it to the value ""pprepair.report_idtest" I get error with "IndexError".

I tried it on Odoo 9, because I read that it could be a bug and get the same behavior.

I may be overlooking a detail, this is driving me nuts.

Avatar
Discard
Best Answer

Hi @aydunno

You need to change your report declaration to this:

  <report
id="report_idtest"
model="pprepair.ppmain"
string="Ppreport"
report_type="qweb-pdf"
name="module.report_idtest_name"
/>

==================update====================

 replace module in the report attr name with the module where the report is defined

Avatar
Discard

already tested, see the answer update

Author

the module name as it appears on the filesystem, not the name give within the class. okay, it works now, thanks!!

Author Best Answer

thanks Axel Mendoza

i tested on the odoo 8 instance and it makes no difference.

I used http://localhost:8069/report/pdf/pprepair.report_idtest_name/1 and http://localhost:8069/report/pdf/report_idtest_name/1 to call.


In setting > reports, the reports exist, in case I forgot to mention that.

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 24
142
0
Oct 24
5
1
May 23
1462
5
May 21
9853
5
Aug 20
29863