Javascript 如何编辑发票Qweb报告的默认标题。奥多14
我使用的是Odoo 14,我想自定义“报告\发票\文档”的标题。 我尝试添加以下代码:Javascript 如何编辑发票Qweb报告的默认标题。奥多14,javascript,python,xml,odoo,Javascript,Python,Xml,Odoo,我使用的是Odoo 14,我想自定义“报告\发票\文档”的标题。 我尝试添加以下代码: <?xml version="1.0" encoding="utf-8"?> <odoo> <data> <template id="report_invoice_extend" inherit_id="account.report_invoice_document&qu
<?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
raise ValueError(格式化的消息)。使用\u回溯(从\u回溯)从\u异常odoo.exceptions.ValidationError:验证视图时出错:
在父视图中找不到元素“”
我的代码出了什么问题?请帮忙。举个例子
如果您想制作自定义标题发票,必须在body类中添加数据oe模型和数据oe id。@Aung Ko Lin,您能举个例子吗?请检查这个,还有这个,@Obay Abd Algader,我编辑了文章,我在链接中尝试了解决方案,但出现了以下错误:无法在父视图中找到元素“”