[FIX] fixed when select type opportunuty then opportunuty in draft mode

bzr revid: shp@tinyerp.com-20121029132313-5ctreoq9nv2fxvxc
This commit is contained in:
pankita shah (Open ERP) 2012-10-29 18:53:13 +05:30
parent 55ce6a560f
commit 084a4217a7
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class crm_lead(base_stage, format_address, osv.osv):
def _get_default_stage_id(self, cr, uid, context=None):
""" Gives default stage_id """
section_id = self._get_default_section_id(cr, uid, context=context)
return self.stage_find(cr, uid, [], section_id, [('state', '=', 'draft'),'|', ('type', '=', 'lead'),('type', '=', 'both'),], context=context)
return self.stage_find(cr, uid, [], section_id, [('state', '=', 'draft'),'|', ('type', '=', 'lead'),'|',('type', '=', 'both'),('type','=','opportunity')], context=context)
def _resolve_section_id_from_context(self, cr, uid, context=None):
""" Returns ID of section based on the value of 'section_id'