首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法继承account.invoice Qweb报表Odoo11e

无法继承account.invoice Qweb报表Odoo11e
EN

Stack Overflow用户
提问于 2017-12-26 11:33:48
回答 1查看 970关注 0票数 0

我想要的:

我想继承模型(account.invoice)名为report_invoice_document的qweb报告,我通过购买->供应商票据访问该报表,然后打印供应商票据的发票。

我到现在为止所做的

我试图继承一个与模型(account.invoice)相关的qweb报告。我只是去设置->报告,并找到了我的qweb模板,需要继承。这是截图。

我进一步钻研我的报告。我成功地找到了名为account.report_invoice_document的报告。这是截图

我已经成功地继承了我所需的视图,它向我展示了我试图在继承的视图中继承视图。这是截图

下面是我继承了现有视图的代码。

代码语言:javascript
复制
 <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

代码语言:javascript
复制
{
    '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报告。

这是公共回购。如果有人想看完整的密码,请留意一下。耽误您时间,实在对不起。

EN

回答 1

Stack Overflow用户

发布于 2017-12-26 15:01:24

我看不出有什么不对劲。您开发了一个模块来继承报表吗?可能是缺少的对帐户模块的依赖。你有没有试着按名字继承,而不是按班级继承?

代码语言:javascript
复制
<xpath expr="//table[@name='invoice_line_table']/thead/tr/th[3]" position="after">
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47978030

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档