[FIX] crm: pass context to the method

lp bug: https://launchpad.net/bugs/907316 fixed

bzr revid: kjo@tinyerp.com-20111222055739-akhfwnvag2xnwy3f
This commit is contained in:
Kuldeep Joshi (OpenERP) 2011-12-22 11:27:39 +05:30
parent c0380d53d3
commit 2392723380
2 changed files with 3 additions and 1 deletions

View File

@ -68,7 +68,7 @@ class res_partner(osv.osv):
'categ_id' : categ_ids and categ_ids[0] or '',
'state' :'draft',
'type': 'opportunity'
})
},context=context)
opportunity_ids[partner_id] = opportunity_id
return opportunity_ids
res_partner()

View File

@ -65,6 +65,8 @@ class crm_partner2opportunity(osv.osv_memory):
data.name,
data.planned_revenue,
data.probability,
partner_ids[0],
context=context,
)
opportunity_id = opportunity_ids[partner_ids[0]]
return lead.redirect_opportunity_view(cr, uid, opportunity_id, context=context)