在Odoo系统中,如果您在产品模板中设置了product_code(interal reference),则该注释也会显示在qweb报告中。我想在销售订单qweb报告中只获取产品名称,是否可以删除(或隐藏)product_code字段报告?如果是这样,请帮我指出解决问题的正确步骤。谢谢 我qweb代码:如何删除Odoo-9销售订单报告qweb中的'product_code'字段?
</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中的产品名称: –