我想要的:
我想继承模型(account.invoice)名为report_invoice_document的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',
],
}如果我做错了什么,请指点我。因为我的相同代码在本地服务器的Odo10C上运行良好。但它并没有影响我的Odoo11e。同时也指导我继承正确的qweb报告。
这是公共回购。如果有人想看完整的密码,请留意一下。耽误您时间,实在对不起。
发布于 2017-12-26 15:01:24
我看不出有什么不对劲。您开发了一个模块来继承报表吗?可能是缺少的对帐户模块的依赖。你有没有试着按名字继承,而不是按班级继承?
<xpath expr="//table[@name='invoice_line_table']/thead/tr/th[3]" position="after">https://stackoverflow.com/questions/47978030
复制相似问题