LaOsaCoop/Odoo16#66 product_sale_price_from_pricelist: fix discounts computation
This commit is contained in:
parent
b89ca1e5d8
commit
c17ceb75a3
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ class StockMove(models.Model):
|
||||||
elif move.product_id.last_purchase_price_compute_type == "with_discount":
|
elif move.product_id.last_purchase_price_compute_type == "with_discount":
|
||||||
price_updated = float_round(
|
price_updated = float_round(
|
||||||
move.purchase_line_id.price_unit
|
move.purchase_line_id.price_unit
|
||||||
* (1 - move.purchase_line_id.discount / 100),
|
* (1 - move.purchase_line_id.discount1 / 100),
|
||||||
precision_digits=2,
|
precision_digits=2,
|
||||||
)
|
)
|
||||||
elif (
|
elif (
|
||||||
|
|
@ -39,7 +39,7 @@ class StockMove(models.Model):
|
||||||
):
|
):
|
||||||
price_updated = float_round(
|
price_updated = float_round(
|
||||||
move.purchase_line_id.price_unit
|
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),
|
* (1 - move.purchase_line_id.discount2 / 100),
|
||||||
precision_digits=2,
|
precision_digits=2,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue