[IMP] crm: added sql constraint to restrict field 'probability'
bzr revid: cha@tinyerp.com-20121119100843-kxy55wnvb6djt0sw
This commit is contained in:
parent
66afff1b52
commit
087fe434b8
|
@ -276,6 +276,10 @@ class crm_lead(base_stage, format_address, osv.osv):
|
|||
'color': 0,
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
('check_probability', 'check(probability <= 100)', 'Probability can not be more than 100% !')
|
||||
]
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(crm_lead, self).create(cr, uid, vals, context)
|
||||
section_id = self.browse(cr, uid, obj_id, context=context).section_id
|
||||
|
|
Loading…
Reference in New Issue