Round unit price from the price list computation

The unit price may not be roundable if the user expression results in a too
large for the Decimal context.

Closes #13542
This commit is contained in:
Cédric Krier
2024-10-08 16:11:50 +02:00
parent 7c22ab2f61
commit 5d1c35d5f8
+1
View File
@@ -215,6 +215,7 @@ class PriceListLine(sequence_ordered(), ModelSQL, ModelView, MatchMixin):
if unit_price is not None:
if not isinstance(unit_price, Decimal):
raise ValueError("result is not a Decimal")
unit_price = round_price(unit_price)
return unit_price
except Exception as exception:
raise FormulaError(