【问题标题】:Odoo - Remove internal reference from Sales Order reportOdoo - 从销售订单报告中删除内部参考
【发布时间】:2018-10-23 13:26:11
【问题描述】:

我正在使用 Odoo 10,我不希望在销售订单报告上打印产品内部参考 (default_code)。我只想从报告中删除,这样客户就看不到内部参考。

我试过下面我在另一个帖子上看到的,但是没有用。

<!-- remove internal reference form Sales report.-->
<template id="sale_order_fields_inherit_saleorder_document" inherit_id="sale.report_saleorder_document">
    <strong><span t-field="l.product_id.name"/></strong>
</template>

【问题讨论】:

  • 您是在说客户参考/您在 SO 报告中的参考。
  • 产品内部参考[default_code]

标签: odoo odoo-10 odoo-11 odoo-view


【解决方案1】:

继承sale_order_document report并将l.name替换为product_id.name这里是完整的代码:

<template id="sale_order_fields_inherit_saleorder_document" 
    inherit_id="sale.report_saleorder_document">
    <xpath expr="//span[@t-field='l.name']" position="replace">
        <span t-field="l.product_id.name"/>
    </xpath>
</template>

你可以试试这个!!,也许对你有帮助!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-03-27
    • 1970-01-01
    • 2012-09-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多