[FIX] website_sale: display real price unit.

Now we display the price_reduce from the sale order line
and not the unit price.

If a discount has been added to the quotation, the user had
in the front end not the real price for the line, but the
discounted total which one is the total of the sale order.

So we need to display the final unit price (= reduce_price) to
be consistent with the total price displayed.
This commit is contained in:
Jeremy Kersten
2015-05-08 12:14:38 +02:00
parent a6b1141cb7
commit 223f65ec29
+2 -2
View File
@@ -644,13 +644,13 @@
<div class="text-muted" t-esc="'\n'.join(line.name.splitlines()[1:])"/>
</td>
<td class="text-center" name="price">
<del class="text-danger" t-att-style="'' if (compute_currency(line.product_id.lst_price) - line.price_unit) &gt; 1 else 'display: none;'" style="text-decoration: line-through; white-space: nowrap;"
<del class="text-danger" t-att-style="'' if (compute_currency(line.product_id.lst_price) - line.price_reduce) &gt; 1 else 'display: none;'" style="text-decoration: line-through; white-space: nowrap;"
t-field="line.product_id.lst_price" t-field-options='{
"widget": "monetary",
"from_currency": "line.company_id.currency_id",
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>&amp;nbsp;
<span t-field="line.price_unit" style="white-space: nowrap;" t-field-options='{
<span t-field="line.price_reduce" style="white-space: nowrap;" t-field-options='{
"widget": "monetary",
"from_currency": "website_sale_order.pricelist_id.currency_id",
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"