diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index 0b6275598d2..e118767b43b 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -218,12 +218,14 @@ class crm_case(object):
def stage_change(self, cr, uid, ids, context=None, order='sequence'):
if context is None:
context = {}
+
stage_pool = self.pool.get('crm.case.stage')
stage_type = context and context.get('stage_type','')
current_seq = False
next_stage_id = False
for case in self.browse(cr, uid, ids, context=context):
+
next_stage = False
value = {}
if case.section_id.id :
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index f5e960dc0d4..f74bad42108 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -16,7 +16,7 @@
-
diff --git a/addons/crm/crm_opportunity_view.xml b/addons/crm/crm_opportunity_view.xml
index b8491830d28..47ca6aee906 100644
--- a/addons/crm/crm_opportunity_view.xml
+++ b/addons/crm/crm_opportunity_view.xml
@@ -14,9 +14,9 @@
-
+ parent="base.menu_crm_config_lead" />
@@ -35,7 +35,7 @@
domain="[('type','=','opportunity'),('section_ids', '=', section_id)]"/>
+ icon="gtk-go-back" string="" context="{'stage_type': 'opportunity'}"/>