Odoo Help


QWebTemplateNotFound: External ID Not found in the system : purchase_qweb.report_purchase_order_template

Mohammed Khamis
on 2/9/15, 1:55 AM 1,387 views

I am start working on Qweb report on odoo V8 but when i run this report I get this error and my code 

<?xml version="1.0" encoding="utf-8"?>
        <template id="report_purchase_order_document">
            <t t-call="report.external_layout">
                <!--VARIABLES TO BE USED LATER-->

                <!-- CALLING HEADER and FOOTER -->
                <t t-call="report.external_layout_header"/>
                <t t-call="report.external_layout_footer"/>

                <div class="page">
                   <t t-foreach="objects" t-as="o">
                           <t t-set="j" t-value = "0" />
                   <t t-foreach = "o.order_line" t-as = "line" >
                           <t t-set="j" t-value = "j+1" />
                   <t t-foreach = "o.order_line" t-as = "line" >
                           <t t-set="count" t-value = "0" />
                   <table class="basic_table" width="100%">
                      <tr><td colspan='4'><b><u><center>Purchase Order </center></u></b></td></tr>
                          <td align="left" style="padding-left:5px" width= "25%" font-size="1px" > 
                          <td align="left" style="padding-left:5px" width="25%" >
                             <t t-esc = "o.date_order" />
                          <td align="left" style="padding-left:5px" width="25%" font-size="1px">Serial No.</td>
                          <td align="left" style="padding-left:5px" width="25%" font-size="1px" ><t t-esc="o.name" /> </td>

                          <td align="left" style="padding-left:5px" width="25%" font-size="1px" > 

                          <td align="left" style="padding-left:5px" width="25%"><t t-esc="o.partner_id.phone" /> </td>
                          <td align="left" style="padding-left:5px" width="25%" font-size="1px">Fax</td>
                          <td align="left" style="padding-left:5px" width="25%" font-size="1px" ><t t-esc="o.partner_id.fax" /> </td>
                        <td colspan='4'><b ><u><center>Item List (Total Items : <t t-esc="count" /> )</center></u></b></td>

        <template id="report_purchase_order_template">
            <t t-call="purchase_qweb.html_container">
                <t t-set="doc_id" t-value="doc_ids[0]"/>
                <t t-raw="translate_doc(doc_id, doc_model, 'company_id.partner_id.lang', 'purchase_qweb.report_purchase_order_document')"/>

and in xml view 

            string="Purchase OrderQ"

please help me how can i solved this problem,

thank you so much


Shawn I removed view and write report.html_container but still not working

Mohammed Khamis
on 2/9/15, 3:46 AM

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
Ankit H Gandhi(AHG)
| 5 3 6
Rajkot, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 2/9/15, 4:15 AM

Hello Mohammed Khamis,

     Try this code in xml file may be helpfull

     <report id="action_report_purchase_order"
                string=""Purchase OrderQ"
                report_type = "qweb-pdf"
                name="purchase_qweb.report_purchase_order_document" />

if you find this answer helpfull, please give me a thumbs up vote    

Thanks & Regards,

Ankit H Gandhi

Shawn Varghese
On 2/9/15, 2:50 AM

I'm assuming your module is called purchase_qweb.

In the XML view, you've written


Try removing the .view, and make it like this



Also, I noticed in this statement,

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

I normally use report.html_container instead. Not sure if that makes a difference. But change the file name as mentioned above and test it first. It should resolve your issue.

Let us know if this doesn't resolve the issue.

Shawn Varghese
on 2/9/15, 2:51 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/9/15, 1:55 AM
Seen: 1387 times
Last updated: 3/16/15, 8:10 AM