Skip to Content
Menu
This question has been flagged
4 Replies
6527 Views

Hi,

I have created a new custom report in sale order

<report
auto="False"
id="sale_confirmation"
model="sale.order"
name="module_name.template_id"
file="module_name.template_id"
report_type="qweb-pdf"
string="Order Confirmation"
/>

<template id="template_id" inherit_id="sale.report_saleorder_document">
        <t t-call="web.html_container">
                <t t-foreach="docs" t-as="doc">
                        <t t-call="module_name.template_id2" t-lang="doc.partner_id.lang"/>
                </t>
        </t>
</template>

but when I try to execute the code it gives me error "Element '<t t-call="web.html_container">' cannot be located in parent view".

Could anyone help me solve the above error.

Thanks in advance!

Avatar
Discard
Author

I am also getting the below error, when I try to print the report

AttributeError: 'NoneType' object has no attribute '_fields'

Best Answer

Hi,

Use xpath ,

<xpath expr="//t[@t-call='web.external_layout']" position="replace">
#your code
</xpath>
Thanks 
Aswini - iWesabe
Avatar
Discard
Author

@Aswini thanks for response

I tried with above xpath also but still same.

Best Answer

Can you please check dependencies of your module once ?

 

Avatar
Discard