Enforce positive number of digits for currency

This commit is contained in:
Cédric Krier
2024-10-14 14:37:41 +02:00
parent 62fe5b3fdf
commit d0efae47b5
+3
View File
@@ -61,6 +61,9 @@ class Currency(
],
help="The minimum amount which can be represented in this currency.")
digits = fields.Integer("Digits", required=True,
domain=[
('digits', '>=', 0),
],
help="The number of digits to display after the decimal separator.")
@classmethod