[FIX] crm: lead to opportunity

When converting a lead to an opportunity, there is a difference in
context than when going to an opportunity via the interface.

This leads to a difference when displaying a kanban view.

This commit adds what is needed in the context.

opw-632640
This commit is contained in:
Nicolas Lempereur 2015-04-15 14:07:25 +02:00
parent 4a7159ca78
commit 6aba1ac0c3
1 changed files with 1 additions and 0 deletions

View File

@ -883,6 +883,7 @@ class crm_lead(format_address, osv.osv):
(tree_view or False, 'tree'), (False, 'kanban'),
(False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
'context': {'default_type': 'opportunity'}
}
def redirect_lead_view(self, cr, uid, lead_id, context=None):