采购订单 - 供应商代码
Purchase Order - Supplier Code
我正在尝试让供应商代码显示在采购订单上。
我能够让它显示,只要只有一个供应商与产品相关联,但如果有更多供应商,我会收到错误消息:Unexpected singleton
<xpath expr="//table[@class='table table-condensed']//tbody//tr" position="replace">
<td>
<span t-f="line.product_id.seller_ids.product_code"/>
</td>
</xpath>
如果产品上有超过 2 个供应商,是否有办法显示默认或第一卖家代码?
下面是简单的方法,使用和运算符。
例如:
<xpath expr="//table[@class='table table-condensed']//tbody//tr" position="replace">
<td>
<span t-field="line.product_id.seller_ids and line.product_id.seller_ids[0].product_code"/>
</td>
</xpath>
我正在尝试让供应商代码显示在采购订单上。
我能够让它显示,只要只有一个供应商与产品相关联,但如果有更多供应商,我会收到错误消息:Unexpected singleton
<xpath expr="//table[@class='table table-condensed']//tbody//tr" position="replace">
<td>
<span t-f="line.product_id.seller_ids.product_code"/>
</td>
</xpath>
如果产品上有超过 2 个供应商,是否有办法显示默认或第一卖家代码?
下面是简单的方法,使用和运算符。
例如:
<xpath expr="//table[@class='table table-condensed']//tbody//tr" position="replace">
<td>
<span t-field="line.product_id.seller_ids and line.product_id.seller_ids[0].product_code"/>
</td>
</xpath>