From 4134424dea5b7b9ad8a1b16c5e7087a3b62459cf Mon Sep 17 00:00:00 2001 From: luis Date: Wed, 30 Apr 2025 09:33:55 +0200 Subject: [PATCH] #128 product_update_price_last_purchase: adapt last purchase price calculation to changes in purchase_triple_discount refactor in OCA/purchase-workflow/pull/2599 --- product_update_price_last_purchase/models/stock_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, )