在订单确认页面中以Odoo 10显示产品重量

在订单确认页面中以Odoo 10显示产品重量,odoo,odoo-10,quotations,Odoo,Odoo 10,Quotations,我添加了许多不同计量单位和重量的产品。在销售订单行中,当客户确认订单时,例如访问https:///shop/confirmation 结帐后翻页 该页面显示数量和计量单位以及价格,但不显示产品重量 假设我有一种叫做Katal fish的产品,重量为500.00克。这里,计量单位设置为克 现在,如果任何用户购买3个单位的卡塔尔鱼销售订单行显示 quantity UOM 3.000 gm 但是,它应该是3*500克或者1500克 似乎在quantity字段中,odoo只显示购物车上的产品数量,没

我添加了许多不同计量单位和重量的产品。在销售订单行中,当客户确认订单时,例如访问https:///shop/confirmation 结帐后翻页

该页面显示数量和计量单位以及价格,但不显示产品重量

假设我有一种叫做Katal fish的产品,重量为500.00克。这里,计量单位设置为克 现在,如果任何用户购买3个单位的卡塔尔鱼销售订单行显示

quantity UOM
3.000 gm 
但是,它应该是3*500克或者1500克

似乎在quantity字段中,odoo只显示购物车上的产品数量,没有任何重量

我只想显示重量和数量

Quantity Weight UOM
3 X 500gm 
7 X 1KG 
等等

请查看屏幕截图以了解更多问题的说明:

注意,Odoo的订单报价QWeb报告也有同样的问题!我试图通过添加

<t field='line.product_weight'> 


但是,似乎没有这样的字段。

您需要继承模板确认

<template id="your_id" inherit_id="website_sale.confirmation" name="name template">
<xpath expr="//div[@class='oe_cart']/table[1]/thead/tr/th[2]" position="after">
    <th>Weight</th>
</xpath>
<xpath expr="//div[@class='oe_cart']/table[1]/tbody/tr/td[2]" position="after">
    <td>
        <div id="product_weight">
            <span t-field="line.product_id.product_weight"/>
        </div>
    </td>
</xpath>
<xpath expr="//div[@class='oe_cart']/table[1]/tfooter/tr[1]/td[1]" position="replace">
    <td class='noborder' colspan="3"></td>
</xpath>
<xpath expr="//div[@class='oe_cart']/table[1]/tfooter/tr[2]/td[1]" position="replace">
    <td class='noborder' colspan="3"></td>
</xpath>
<xpath expr="//div[@class='oe_cart']/table[1]/tfooter/tr[3]/td[1]" position="replace">
    <td class='noborder' colspan="3"></td>
</xpath>
</template>

重量

希望这有帮助。…

您需要继承模板确认

<template id="your_id" inherit_id="website_sale.confirmation" name="name template">
<xpath expr="//div[@class='oe_cart']/table[1]/thead/tr/th[2]" position="after">
    <th>Weight</th>
</xpath>
<xpath expr="//div[@class='oe_cart']/table[1]/tbody/tr/td[2]" position="after">
    <td>
        <div id="product_weight">
            <span t-field="line.product_id.product_weight"/>
        </div>
    </td>
</xpath>
<xpath expr="//div[@class='oe_cart']/table[1]/tfooter/tr[1]/td[1]" position="replace">
    <td class='noborder' colspan="3"></td>
</xpath>
<xpath expr="//div[@class='oe_cart']/table[1]/tfooter/tr[2]/td[1]" position="replace">
    <td class='noborder' colspan="3"></td>
</xpath>
<xpath expr="//div[@class='oe_cart']/table[1]/tfooter/tr[3]/td[1]" position="replace">
    <td class='noborder' colspan="3"></td>
</xpath>
</template>

重量

希望这能帮上忙……

我通过修改Mihir的

line.product\u id.product\u weight
替换为
line.product\u id.weight
,如下所示:

<xpath expr="//div[@class='oe_cart']/table[1]/tbody/tr/td[2]" position="after">
    <td>
        <div id="product_weight">
            <span t-field="line.product_id.weight"/>
        </div>
    </td>
</xpath>

我通过修改Mihir的

line.product\u id.product\u weight
替换为
line.product\u id.weight
,如下所示:

<xpath expr="//div[@class='oe_cart']/table[1]/tbody/tr/td[2]" position="after">
    <td>
        <div id="product_weight">
            <span t-field="line.product_id.weight"/>
        </div>
    </td>
</xpath>