Merge lp:~openerp-dev/openobject-addons/trunk-bug-907316-kjo into lp:openobject-addons

Proposed by Kuldeep Joshi(OpenERP)
Status: Merged
Merged at revision: 6113
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-907316-kjo
Merge into: lp:openobject-addons
Diff against target: 25 lines (+3/-1)
2 files modified
crm/res_partner.py (+1/-1)
crm/wizard/crm_partner_to_opportunity.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-907316-kjo
Reviewer Review Type Date Requested Status
Thibault Delavallée (OpenERP) (community) Approve
Bhumika Shrimali (community) Approve
Review via email: mp+86656@code.launchpad.net

Description of the change

[FIX] crm: pass the context to the method

To post a comment you must log in.
Revision history for this message
Bhumika Shrimali (sbh-openerp) :
review: Approve
Revision history for this message
Thibault Delavallée (OpenERP) (tde-openerp) wrote :

Fix landed in trunk
revno: 6113
revision-id: <email address hidden>

I have however a remark about your fix. Your change description is not precise as you also modified partner.make_opportunity(...) call by adding partner_ids[0]. I also added a line in your fix to protect against empty lists.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'crm/res_partner.py'
2--- crm/res_partner.py 2011-12-19 16:54:40 +0000
3+++ crm/res_partner.py 2011-12-22 06:04:30 +0000
4@@ -68,7 +68,7 @@
5 'categ_id' : categ_ids and categ_ids[0] or '',
6 'state' :'draft',
7 'type': 'opportunity'
8- })
9+ },context=context)
10 opportunity_ids[partner_id] = opportunity_id
11 return opportunity_ids
12 res_partner()
13
14=== modified file 'crm/wizard/crm_partner_to_opportunity.py'
15--- crm/wizard/crm_partner_to_opportunity.py 2011-12-19 16:54:40 +0000
16+++ crm/wizard/crm_partner_to_opportunity.py 2011-12-22 06:04:30 +0000
17@@ -65,6 +65,8 @@
18 data.name,
19 data.planned_revenue,
20 data.probability,
21+ partner_ids[0],
22+ context=context,
23 )
24 opportunity_id = opportunity_ids[partner_ids[0]]
25 return lead.redirect_opportunity_view(cr, uid, opportunity_id, context=context)

Subscribers

People subscribed via source and target branches

to all changes: