Replace _constraints with validate in ModelStorage and improve user messages.

issue2616
review371002
This commit is contained in:
Albert Cervera i Areny committed 2013-03-07 16:55:54 +01:00
1 parent 982841388e
commit 77fa302bbf
1 file changed
+2 -2
+2 -2
View File
@@ -98,11 +98,11 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
cls._sql_constraints += [
('check_percentage',
'CHECK(probability >= 0 AND probability <= 100)',
'Probability must be between 0 and 100!')
'Probability must be between 0 and 100.')
]
cls._error_messages.update({
'delete_cancel': ('Sale Opportunity "%s" must be cancelled '
'before deletion!'),
'before deletion.'),
})
cls._transitions |= set((
('lead', 'opportunity'),