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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user