Report 如何在odoo 11中进行报告

Report 如何在odoo 11中进行报告,report,odoo,odoo-11,Report,Odoo,Odoo 11,我是Odoo的初学者,我想自定义sale中已经存在的报告,因此我继承了sale,但我的代码显示了一个错误,即: 验证约束时出错。。。。无法在父视图中找到 除此之外,如果我只执行第一部分,它会工作,但它会直接修改dirty的报告,但模块中的报告仍然为空 代码如下: <template id="report_real_estate_rental_in" inherit_id="sale.report_saleorder_document"> <xpath expr="//s

我是Odoo的初学者,我想自定义sale中已经存在的报告,因此我继承了sale,但我的代码显示了一个错误,即: 验证约束时出错。。。。无法在父视图中找到

除此之外,如果我只执行第一部分,它会工作,但它会直接修改dirty的报告,但模块中的报告仍然为空

代码如下:

<template id="report_real_estate_rental_in" inherit_id="sale.report_saleorder_document">
    <xpath expr="//span[@t-field='doc.name']" position="after">
        <p>JE SUIS LA</p>
    </xpath>
</template>

<template id="report_real_estate_rental">
    <t  t-call = "web.html_container" >
        <t  t-foreach = "docs"  t-as = "o" >
            <t  t-call = "web.external_layout" >
                <div  class = "page" >
                    <t t-call="report_real_estate_rental_in"/>
                </div>
            </t>
        </t>
    </t>
</template>

我是苏拉


当无法在父视图中找到xpath表达式时,通常会发生此错误。请确保xpath表达式正确,并且您继承的模板id正确。查看此文档以继承和修改Odoo中的现有报告。

如果我得到了您想要的问题,那么当您使用
t-call
时,您还必须包括模块名称,因此它将是
module\u name.template\u id


在您的情况下,将其更改为

是的,我就是这么做的。但问题始终是我的模板相同,当我修改结构时,我的报告没有改变,我不明白为什么它仍然是相同的same@CherifiFares确保您继承了正确的模块,并在manifestI中调用了xml文件。我这样做了,并且继承了正确的模块。我的报表仍处于冻结状态,但我继承的报表(脏)接受我所做的更改。@Cheriffares您是否将此报表绑定到您的模块