我想要的是:
我想继承名为 report_invoice_document 的模型(account.invoice)qweb 报告,我通过购买->供应商账单然后打印供应商账单的发票访问该报告。
到现在为止我做了什么
我正在尝试继承与模型(account.invoice)相关的 qweb 报告。我只需转到设置->报告并找到需要继承的我的 qweb 模板。这是屏幕截图。
我进一步深入研究我的报告。我已成功找到名为 account.report_invoice_document 的报告。这是屏幕截图
我已经成功继承了我需要的视图,它告诉我我曾尝试在继承的视图中继承然后查看。这是屏幕截图
这是我继承现有视图的代码。
<template id="myinherited_account_invoice_report" inherit_id="account.report_invoice_document">
<xpath expr="//table[@class='table table-condensed']/thead/tr/th[3]" position="after">
<th class="text-right">Analytic Account</th>
<th class="text-right">Analytic Tags</th>
</xpath>
<xpath expr="//table[@class='table table-condensed']/tbody/tr/td[3]" position="after">
<td class="text-right">testt1</td>
<td class="text-right">testt2</td>
</xpath>
</template>
这是我的 pdf qweb 报告,对我的工作没有影响。
这是我的 manifest.py
{
'name': "invoice_reports",
'summary': """
Inherit the qweb reports of Account.invoice""",
'description': """
Inherit the qweb reports of Account.invoice
""",
'author': "Hassan Ali(Dynexcel)",
'website': "http://www.dynexcel.com",
'category': 'Qweb',
'version': '0.1',
'depends': ['account'],
'data': [
'views/templates.xml',
],
# only loaded in demonstration mode
'demo': [
'demo/demo.xml',
],
}
如果我在这里做错了什么,请指导我。因为我的相同代码在我的本地服务器上的 odoo 10C 上运行良好。但这并没有影响我的 odoo 11E。并指导我是否继承了正确的 qweb 报告。
这是公共回购。任何想查看完整代码的人都可以关注它。谢谢你的时间。