diff --git a/product_update_price_last_purchase/models/stock_move.py b/product_update_price_last_purchase/models/stock_move.py index e30e522..424c563 100644 --- a/product_update_price_last_purchase/models/stock_move.py +++ b/product_update_price_last_purchase/models/stock_move.py @@ -33,7 +33,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), precision_digits=2, ) elif ( @@ -42,7 +42,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, )