[IMP] base: add constraints when you try to set rounding factor 0(zero) in currency

This commit is contained in:
Dhaval Panchal
2017-03-16 15:15:37 +01:00
committed by Yannick Tivisse
parent ebeaefea5d
commit 455a420a08
+1
View File
@@ -31,6 +31,7 @@ class Currency(models.Model):
_sql_constraints = [
('unique_name', 'unique (name)', 'The currency code must be unique!'),
('rounding_gt_zero', 'CHECK (rounding>0)', 'The rounding factor must be greater than 0!')
]
@api.multi