【发布时间】:2017-03-27 05:12:12
【问题描述】:
在Odoo系统中,如果您在产品模板中设置product_code(内部引用),该注释也会显示在qweb报告中。我只想在销售订单 qweb 报告中获取产品名称,是否可以删除(或隐藏)product_code 字段报告?如果是,请帮助我确定解决问题的正确步骤。谢谢 我的 qweb 代码:
</tr>
<t t-set="index" t-value="0"/>
<t t-set="product" t-value="0"/>
<t t-foreach="doc.handle_orderline(doc.order_line)" t-as="product_line">
<t t-set="product_num" t-value="0"/>
<t t-set="index" t-value="index + 1"/>
<t t-foreach="product_line" t-as="l">
<t t-set="product_num" t-value="product_num+1"/>
<t t-if="not l.product_uom_qty">
<t t-set="index" t-value="index - 1"/>
</t>
<tr t-if="l.product_uom_qty">
<t t-if="product_num == 1">
<td class="text-center" t-att-rowspan="len(product_line)">
<span t-esc="index"/>
</td>
<td class="text-center" t-att-rowspan="len(product_line)">
<strong><span t-field="l.name"/></strong>
<br/>
<t t-if="l.width_id">( <span style="font-style:italic" t-field="l.width_id.name"/> )</t>
</td>
</t>
【问题讨论】:
-
到目前为止你有什么尝试?你能用你的尝试代码更新你的问题吗?
-
感谢您的回复,流动的代码显示了我的 sale_order_report_documents 中的产品名称: