diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py
index 2adf9fb84e4..b488137e50a 100644
--- a/addons/crm/crm_lead.py
+++ b/addons/crm/crm_lead.py
@@ -1221,3 +1221,39 @@ class crm_lost_reason(osv.Model):
_columns = {
'name': fields.char('Name', required=True),
}
+
+
+class crm_team(osv.Model):
+ _inherit = "crm.team"
+ def action_your_pipeline(self, cr, uid, context={}):
+ imd = self.pool.get('ir.actions.act_window')
+ action = imd.for_xml_id(cr, uid, 'crm', "crm_lead_opportunities_tree_view", context=context)
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ team_id = user.sale_team_id.id
+ if not team_id:
+ team_id = self.search(cr, uid, [], context=context, limit=1)
+ team_id = team_id and team_id[0]
+ action['help'] = """
+
Click here to add new opportunities
+ Looks like you are not a member of a sales team. You should add yourself
+ as a member of one of the sales team.
+
"""
+ if team_id:
+ action['help'] += "As you don't belong to any sales team, Odoo opens the first one by default.
"
+ newcontext = eval(action['context'], {'uid': uid})
+ if team_id:
+ newcontext.update({
+ 'default_team_id': team_id,
+ 'search_default_team_id': team_id
+ })
+ result = {
+ 'name': action['name'],
+ 'help': action['help'],
+ 'type': action['type'],
+ 'views': [[False, 'kanban'], [False, 'tree'], [False, 'form'], [False, 'graph'], [False, 'calendar'], [False, 'pivot']],
+ 'target': action['target'],
+ 'context': newcontext,
+ 'res_model': action['res_model'],
+ }
+ return result
+
diff --git a/addons/crm/crm_lead_menu.xml b/addons/crm/crm_lead_menu.xml
index f1245382535..d569110a2e0 100644
--- a/addons/crm/crm_lead_menu.xml
+++ b/addons/crm/crm_lead_menu.xml
@@ -54,18 +54,25 @@
+
+ Your Pipeline
+
+ code
+ action = self.action_your_pipeline(cr, uid, context=context)
+
+
+
- Pipeline
+ Your Pipeline
crm.lead
- tree,graph,pivot,form,calendar
+ kanban,tree,graph,pivot,form,calendar
[('type','=','opportunity')]
{
'stage_type': 'opportunity',
'default_type': 'opportunity',
'default_user_id': uid,
'search_default_assigned_to_me': 1,
- }
-
+}
@@ -102,7 +109,7 @@
-
+
Next Activities
diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml
index f4874d6c5ea..d0e6258bd80 100644
--- a/addons/crm/crm_lead_view.xml
+++ b/addons/crm/crm_lead_view.xml
@@ -368,7 +368,8 @@
name="type_opportunity"
domain="[('type', '=', 'opportunity')]"/>
-
-
-
-
@@ -27,7 +25,7 @@
- Sales Teams
+ Dashboard
crm.team
form
sales_team_dashboard
diff --git a/addons/sales_team/sales_team_dashboard.xml b/addons/sales_team/sales_team_dashboard.xml
index 79f2bfba168..d94efdb385a 100644
--- a/addons/sales_team/sales_team_dashboard.xml
+++ b/addons/sales_team/sales_team_dashboard.xml
@@ -62,11 +62,4 @@
-
- Sales Team Dashboard
- crm.team
- sales_team_dashboard
-
-
-
diff --git a/addons/sales_team/sales_team_demo.xml b/addons/sales_team/sales_team_demo.xml
index 68cc2e0f7a0..552e89b93f0 100644
--- a/addons/sales_team/sales_team_demo.xml
+++ b/addons/sales_team/sales_team_demo.xml
@@ -10,7 +10,6 @@
Indirect Sales
-
diff --git a/addons/sales_team/static/src/xml/sales_team_dashboard.xml b/addons/sales_team/static/src/xml/sales_team_dashboard.xml
index bce1fac5d8c..eb67da5934a 100644
--- a/addons/sales_team/static/src/xml/sales_team_dashboard.xml
+++ b/addons/sales_team/static/src/xml/sales_team_dashboard.xml
@@ -3,7 +3,7 @@
@@ -233,7 +233,7 @@
Hi there!
Great sales journeys start with a clean pipeline.
Create a few opportunities to activate your dashboard.
- Your Pipeline
+ Your Pipeline
diff --git a/addons/website_crm/data/website_crm_data.xml b/addons/website_crm/data/website_crm_data.xml
index a116a6ae411..e74672c71b1 100644
--- a/addons/website_crm/data/website_crm_data.xml
+++ b/addons/website_crm/data/website_crm_data.xml
@@ -21,7 +21,6 @@
Website Sales
WS
-
True
diff --git a/addons/website_sale/data/data.xml b/addons/website_sale/data/data.xml
index e0eaeec4b5a..798d2221c81 100644
--- a/addons/website_sale/data/data.xml
+++ b/addons/website_sale/data/data.xml
@@ -30,7 +30,6 @@
Website Sales
WS
-
diff --git a/addons/website_sale/data/demo.xml b/addons/website_sale/data/demo.xml
index 115356a469f..fb43f644bb1 100644
--- a/addons/website_sale/data/demo.xml
+++ b/addons/website_sale/data/demo.xml
@@ -548,13 +548,9 @@ Weight: 31 grams
-0.2000
1
-
-
-
-
-
+
Components
15