Replace _constraints with validate in ModelStorage and improve user messages.
issue2616 review371002
This commit is contained in:
1 parent
982841388e
commit
77fa302bbf
1 file changed
+2
-2
+2
-2
@@ -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'),
|
||||
|
||||
Reference in new issue
Block a user