From c17ceb75a329b1c3e2e6efea9e009e1998730ead Mon Sep 17 00:00:00 2001 From: luis Date: Sat, 2 Aug 2025 09:33:39 +0200 Subject: [PATCH] LaOsaCoop/Odoo16#66 product_sale_price_from_pricelist: fix discounts computation --- product_sale_price_from_pricelist/models/stock_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/product_sale_price_from_pricelist/models/stock_move.py b/product_sale_price_from_pricelist/models/stock_move.py index 419eb21..a877915 100644 --- a/product_sale_price_from_pricelist/models/stock_move.py +++ b/product_sale_price_from_pricelist/models/stock_move.py @@ -31,7 +31,7 @@ class StockMove(models.Model): elif move.product_id.last_purchase_price_compute_type == "with_discount": price_updated = float_round( move.purchase_line_id.price_unit - * (1 - move.purchase_line_id.discount / 100), + * (1 - move.purchase_line_id.discount1 / 100), precision_digits=2, ) elif ( @@ -39,7 +39,7 @@ class StockMove(models.Model): ): price_updated = float_round( move.purchase_line_id.price_unit - * (1 - move.purchase_line_id.discount / 100) + * (1 - move.purchase_line_id.discount1 / 100) * (1 - move.purchase_line_id.discount2 / 100), precision_digits=2, )