如何编辑发票 Qweb 报告的默认标题奥多14

问题描述

我正在使用 odoo 14,我想自定义“report_invoice_document”的标题。 我尝试添加代码

<?xml version="1.0" encoding="utf-8"?>
  <odoo>
     <data>
       <template id="report_invoice_extend" inherit_id="account.report_invoice_document">
        <t t-call="my_module.external_layout_footer_inherit_cr">
    
        </t>
     </template>
    </data>
 </odoo>


<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="external_layout_footer_inherit_cr"
            inherit_id="report.external_layout_footer">
            <xpath expr="//div[@class='footer']" position="replace">
                <div class="footer">
                    <span>Test</span>
                </div>
            </xpath>
        </template>
</odoo>

但是我遇到了这个错误

raise ValueError(formatted_message).with_traceback(from_traceback) from from_exception odoo.exceptions.ValidationError: Error while validating view:

Element '<t t-call="my_module.external_layout_footer_inherit_cr">' cannot be located in parent view

我的代码有什么问题?请帮忙。

解决方法

举个例子

getIntArray()