0
votes

To learn about creating modules, I did the odoo tutorial, which is a guide to create a sample module - this report works.

I followed the exact same steps to create the report in my module and it is not working, I keep getting this error when accessing it via the reports url:

"QWebTemplateNotFound: External ID not found in the system: pprepair.report_idtest_name".

I read about this problem that it could be a bug in the version I was using, so I updated to the recently released Odoo 9 but still get the same error. Different text, but same problem: ID could not be found.

I checked in the settings and the report is there. So it was created correctly, but somehow, it could not be accessed.

Perhaps I am missing somehting.

Attached is my code, please help.

<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>
2
Perhaps you didn't install python-passlib package ----> sudo apt-get install python-passlibRutul Raval
passlib is installedaydunno

2 Answers

0
votes

When you create a report action like this :

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

In last line it should be name="modulename.report_id".

I hope it will be useful.

0
votes
<openerp>
<data>


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


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


</data>
</openerp>

Define template before calling it in report tag. Swap them.