Replace _constraints with validate in ModelStorage and improve user messages.

issue2616
review371002
This commit is contained in:
Albert Cervera i Areny
2013-03-07 16:55:46 +01:00
parent 44fa027acb
commit eb6ff8b7a6
+1 -1
View File
@@ -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'))