_inherit = 'crm.case'
_columns = {
'stage_id': fields.many2one ('crm.case.stage', 'Stage', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
- 'categ_id': fields.many2one('crm.case.categ', 'Category', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
+ 'categ_id': fields.many2one('crm.case.categ', 'Source', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
'type_id': fields.many2one('crm.case.resource.type', 'Resource Type', domain="[('section_id','=',section_id),('object_id.model', '=', 'crm.opportunity')]"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'probability': fields.float('Probability (%)'),
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
}
+ def onchange_stage_id(self, cr, uid, ids, stage, context={}):
+ if not stage:
+ return {'value':{}}
+ probability = self.pool.get('crm.case.stage').browse(cr, uid, stage, context).probability
+ return {'value':{'probability':probability}}
crm_opportunity()