From 55ce6a560fb31e86b3a0ae8d21ccaec9e48db3da Mon Sep 17 00:00:00 2001 From: "pankita shah (Open ERP)" Date: Mon, 29 Oct 2012 18:12:26 +0530 Subject: [PATCH] [FIX] when user select lead and get draft mode bzr revid: shp@tinyerp.com-20121029124226-cjn6s3sj434rm5q7 --- addons/crm/crm_lead.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 9ee5aeb2301..00ee7582c4d 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -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', '=', 'both')], context=context) + return self.stage_find(cr, uid, [], section_id, [('state', '=', 'draft'),'|', ('type', '=', 'lead'),('type', '=', 'both'),], context=context) def _resolve_section_id_from_context(self, cr, uid, context=None): """ Returns ID of section based on the value of 'section_id' @@ -340,7 +340,7 @@ class crm_lead(base_stage, format_address, osv.osv): cases = self.browse(cr, uid, cases, context=context) # collect all section_ids section_ids = [] - types = ['both'] + types = ['lead','opportunity','both'] if section_id: section_ids.append(section_id) for lead in cases: