Skip to content
Snippets Groups Projects
Commit 851992cd authored by Goffin Simon's avatar Goffin Simon
Browse files

[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
parent c40070fb
No related branches found
No related tags found
No related merge requests found
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment