openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #24430
[Bug 1208436] [NEW] Lead to opportunity wizard: partner not created when existing partner found, even when choosing 'create' in the wizard
Public bug reported:
Steps to reproduce:
1) Launch the lead to opportunity wizard for a lead with contact info that corresponds to an existing partner (but this partner is not selected in the lead).
2) When the wizard opens, it automatically suggests to 'link with existing partner'.
3) Choose 'create new partner' instead and click 'create opportunity'.
Result:
The opportunity is linked to the existing partner. No new partner is created, even though that's what I selected in the wizard.
Cause:
In crm_lead2opportunity_partner._create_partner, the following 2 lines are defined:
partner_id = data.partner_id and data.partner_id.id or False
return lead.handle_partner_assignation(cr, uid, lead_ids, data.action, partner_id, context=context)
Since an existing partner was found, 'data.partner_id' exists, thus this will be given as input for the 'handle_partner_assignation' method. This last method defines the following lines:
force_partner_id = partner_id
for lead in self.browse(cr, uid, ids, context=context):
# If the action is set to 'create' and no partner_id is set, create a new one
if action == 'create':
partner_id = force_partner_id or self._create_lead_partner(cr, uid, lead, context)
Thus, when a partner_id is given, the lead/opportunity is linked to it,
even when the action is 'create'!
So as far as I can see, there's 2 errors in the code:
1) If the 'handle_partner_assignation' method has 'create' as action, it should always do a create, whether the partner_id is given or not.
2) The '_create_partner' method should check the action, and call 'handle_partner_assignation' with our without partner_id accordingly.
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1208436
Title:
Lead to opportunity wizard: partner not created when existing partner
found, even when choosing 'create' in the wizard
Status in OpenERP Addons (modules):
New
Bug description:
Steps to reproduce:
1) Launch the lead to opportunity wizard for a lead with contact info that corresponds to an existing partner (but this partner is not selected in the lead).
2) When the wizard opens, it automatically suggests to 'link with existing partner'.
3) Choose 'create new partner' instead and click 'create opportunity'.
Result:
The opportunity is linked to the existing partner. No new partner is created, even though that's what I selected in the wizard.
Cause:
In crm_lead2opportunity_partner._create_partner, the following 2 lines are defined:
partner_id = data.partner_id and data.partner_id.id or False
return lead.handle_partner_assignation(cr, uid, lead_ids, data.action, partner_id, context=context)
Since an existing partner was found, 'data.partner_id' exists, thus this will be given as input for the 'handle_partner_assignation' method. This last method defines the following lines:
force_partner_id = partner_id
for lead in self.browse(cr, uid, ids, context=context):
# If the action is set to 'create' and no partner_id is set, create a new one
if action == 'create':
partner_id = force_partner_id or self._create_lead_partner(cr, uid, lead, context)
Thus, when a partner_id is given, the lead/opportunity is linked to
it, even when the action is 'create'!
So as far as I can see, there's 2 errors in the code:
1) If the 'handle_partner_assignation' method has 'create' as action, it should always do a create, whether the partner_id is given or not.
2) The '_create_partner' method should check the action, and call 'handle_partner_assignation' with our without partner_id accordingly.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1208436/+subscriptions
Follow ups
-
[Bug 1208436] Re: Lead to opportunity wizard: partner not created when existing partner found, even when choosing 'create' in the wizard
From: OpenERP, 2013-11-29
-
[Bug 1208436] Re: Lead to opportunity wizard: partner not created when existing partner found, even when choosing 'create' in the wizard
From: jeffery chen fan, 2013-11-08
-
[Bug 1208436] Re: Lead to opportunity wizard: partner not created when existing partner found, even when choosing 'create' in the wizard
From: Ravi Gohil (OpenERP), 2013-08-13
-
[Bug 1208436] Re: Lead to opportunity wizard: partner not created when existing partner found, even when choosing 'create' in the wizard
From: Launchpad Bug Tracker, 2013-08-07
-
[Bug 1208436] Re: Lead to opportunity wizard: partner not created when existing partner found, even when choosing 'create' in the wizard
From: Ravi Gohil (OpenERP), 2013-08-07
-
[Bug 1208436] Re: Lead to opportunity wizard: partner not created when existing partner found, even when choosing 'create' in the wizard
From: Vinay Rana (OpenERP), 2013-08-05
-
[Bug 1208436] [NEW] Lead to opportunity wizard: partner not created when existing partner found, even when choosing 'create' in the wizard
From: Karel Marissens, 2013-08-05
References