#128 product_update_price_last_purchase: adapt last purchase price calculation to changes in purchase_triple_discount refactor in OCA/purchase-workflow/pull/2599

This commit is contained in:
Luis 2025-04-30 09:33:55 +02:00
parent 4ab5fa28e8
commit 4134424dea

View file

@ -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,
)