[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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user