Replace _constraints with validate in ModelStorage and improve user messages.
issue2616 review371002
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ class EmployeeCostPrice(ModelSQL, ModelView):
|
||||
super(EmployeeCostPrice, cls).__setup__()
|
||||
cls._sql_constraints = [
|
||||
('date_cost_price_uniq', 'UNIQUE(date, cost_price)',
|
||||
'A employee can only have one cost price by date!'),
|
||||
'A employee can only have one cost price by date.'),
|
||||
]
|
||||
cls._order.insert(0, ('date', 'DESC'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user