[FIX] product_visible_discount: lst_price
In a SO line, the price unit is taken from function "_product_price" set on the product(model: "product.product"), this is why the variable new_list_price has to be taken on the product too. In this way, the right discount can be computed. Before the fix, new_list_price was equal to the price set on the product template(list_price) then if the product template had several variants with several sale price, the discount was wrongly computed. opw:668636
This commit is contained in:
@@ -20,7 +20,7 @@ class sale_order_line(osv.osv):
|
||||
"""Retrieve the price before applying the pricelist"""
|
||||
item_obj = self.pool['product.pricelist.item']
|
||||
product_obj = self.pool['product.product']
|
||||
field_name = 'list_price'
|
||||
field_name = 'lst_price'
|
||||
currency_id = None
|
||||
if res_dict.get(pricelist):
|
||||
rule_id = res_dict[pricelist][1]
|
||||
|
||||
Reference in New Issue
Block a user