Se rendre au contenu
Menu
Cette question a été signalée
4 Réponses
6528 Vues

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

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

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

Meilleure réponse

Hi,

Use xpath ,

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

@Aswini thanks for response

I tried with above xpath also but still same.

Meilleure réponse

Can you please check dependencies of your module once ?

 

Avatar
Ignorer