From 0046c4bfc062cc530c48639432029af5601263d4 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 15 Jul 2010 19:13:16 +0530 Subject: [PATCH] [IMP]: crm: We should be able to convert a lead to an opportunity when it is pending bzr revid: rpa@tinyerp.com-20100715134316-ot4y5jrud2j5jc73 --- addons/crm/wizard/crm_lead_to_opportunity.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/crm/wizard/crm_lead_to_opportunity.py b/addons/crm/wizard/crm_lead_to_opportunity.py index 7f47e27a4ff..acb259718f1 100644 --- a/addons/crm/wizard/crm_lead_to_opportunity.py +++ b/addons/crm/wizard/crm_lead_to_opportunity.py @@ -126,9 +126,9 @@ class crm_lead2opportunity(osv.osv_memory): if lead.state in ['done', 'cancel']: raise osv.except_osv(_("Warning !"), _("Closed/Cancelled \ Leads Could not convert into Opportunity")) - if lead.state != 'open': + if lead.state not in ('open', 'pending'): raise osv.except_osv(_('Warning !'), _('Lead should be in \ -\'Open\' state before converting to Opportunity.')) +\'Open\' or \'Pending\' state before converting to Opportunity.')) return False def default_get(self, cr, uid, fields, context=None): @@ -289,9 +289,9 @@ class crm_lead2opportunity_partner(osv.osv_memory): if lead.state in ['done', 'cancel']: raise osv.except_osv(_("Warning !"), _("Closed/Cancelled \ Leads Could not convert into Opportunity")) - if lead.state != 'open': + if lead.state not in ('open', 'pending'): raise osv.except_osv(_('Warning !'), _('Lead should be in \ -\'Open\' state before converting to Opportunity.')) +\'Open\' or \'Pending\' state before converting to Opportunity.')) return False crm_lead2opportunity_partner()