From c3117568ad271987fab37b9653eec4cee986c951 Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Fri, 15 Mar 2024 19:18:30 +0100 Subject: [PATCH] Round code price before storage when modifying from product wizard Closes #13041 --- modules/stock/product.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/stock/product.py b/modules/stock/product.py index 2a75805481..2a8cd96268 100644 --- a/modules/stock/product.py +++ b/modules/stock/product.py @@ -1193,7 +1193,8 @@ class ModifyCostPrice(Wizard): product.cost_price_method == 'fixed' and revision.date == today) or product.type == 'service'): - cost = revision.get_cost_price(product.cost_price) + cost = round_price( + revision.get_cost_price(product.cost_price)) costs[cost].append(product) records.remove(product) elif self.model.__name__ == 'product.template': @@ -1207,7 +1208,8 @@ class ModifyCostPrice(Wizard): and revision.date == today) or template.type == 'service'): for product in template.products: - cost = revision.get_cost_price(product.cost_price) + cost = round_price( + revision.get_cost_price(product.cost_price)) costs[cost].append(product) records.remove(template) Revision.save(revisions)