[IMP] base: add constraints when you try to set rounding factor 0(zero) in currency
This commit is contained in:
committed by
Yannick Tivisse
parent
ebeaefea5d
commit
455a420a08
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user