[FIX] sale: pricelist price base

When setting a pricelist to show the public price discount, it ignored
the pricelist item's base field (if not 'Other Pricelist') and set it
by default on the lst_price instead.

This did not work when you based your discount on the standard_price
(= cost price) with public price discount.

Now it does.

opw: 775275
This commit is contained in:
Denis Vermylen
2017-10-16 17:26:11 +02:00
parent d301d6391d
commit c477f0764e
+1 -1
View File
@@ -857,7 +857,7 @@ class SaleOrderLine(models.Model):
return price
else:
from_currency = self.order_id.company_id.currency_id
return from_currency.compute(product.lst_price, self.order_id.pricelist_id.currency_id)
return from_currency.compute(product[pricelist_item.base], self.order_id.pricelist_id.currency_id)
@api.multi
@api.onchange('product_id')