[IMP] marketing_campaign: set default values and constraint on transitions
bzr revid: chs@openerp.com-20100630140833-v8uzrivln8u61kda
This commit is contained in:
@@ -375,6 +375,15 @@ class marketing_campaign_transition(osv.osv):
|
||||
required=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'interval_nbr': 1,
|
||||
'interval_type': 'days',
|
||||
}
|
||||
|
||||
_sql_constraints = [
|
||||
('interval_positive', 'CHECK(interval_nbr >= 0)', 'The interval must be positive or zero')
|
||||
]
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
value = super(marketing_campaign_transition, self).default_get(cr, uid,
|
||||
fields, context)
|
||||
|
||||
Reference in New Issue
Block a user