From dc736426ddd14754303fceea33c2d1478db1e1f3 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 14 Jul 2015 11:08:25 +0200 Subject: [PATCH] [REM] sales_team, crm, various: removed multisalesteam mode and group. Using several sales team and the new dashboards is now the only behavior about sales team. The unique sales team mode is therefore removed, leading to some update in the various addons that hide the team_id field when not in multi sales team mode. [DEMO] cleaned demo data (removed marketing sales team because it should not exist) --- .../report/account_invoice_report_view.xml | 2 +- addons/crm/crm_demo.xml | 9 ----- addons/crm/crm_lead.py | 2 +- addons/crm/crm_lead_demo.xml | 14 ++++---- addons/crm/crm_lead_view.xml | 24 ++++++------- addons/crm/crm_report_view.xml | 35 +++++++++---------- .../crm/report/crm_activity_report_view.xml | 5 ++- addons/crm/report/crm_lead_report_view.xml | 5 ++- .../report/crm_opportunity_report_view.xml | 5 ++- addons/crm/res_config_view.xml | 6 ++-- addons/crm/res_partner_view.xml | 2 +- addons/crm/test/crm_lead_cancel.yml | 2 +- addons/crm/views/crm_action_views.xml | 4 +-- .../wizard/crm_lead_to_opportunity_view.xml | 8 ++--- .../wizard/crm_merge_opportunities_view.xml | 4 +-- addons/crm_claim/crm_claim_view.xml | 6 ++-- .../report/crm_claim_report_view.xml | 5 ++- addons/crm_partner_assign/crm_lead_demo.xml | 2 +- addons/crm_partner_assign/crm_portal_view.xml | 4 +-- .../report/crm_lead_report_view.xml | 5 ++- .../report/crm_partner_report_view.xml | 4 +-- addons/sale/report/invoice_report_view.xml | 2 +- addons/sale/report/sale_report_view.xml | 2 +- addons/sale/sale_view.xml | 10 +++--- addons/sales_team/__init__.py | 1 - addons/sales_team/__openerp__.py | 1 - addons/sales_team/res_config.py | 14 -------- addons/sales_team/res_config_view.xml | 28 --------------- addons/sales_team/sales_team.xml | 2 +- addons/sales_team/sales_team_data.xml | 1 - addons/sales_team/sales_team_demo.xml | 11 ------ .../security/sales_team_security.xml | 4 --- .../demo/website_crm_score_demo.xml | 2 +- addons/website_sale/security/website_sale.xml | 6 ---- 34 files changed, 76 insertions(+), 161 deletions(-) delete mode 100644 addons/sales_team/res_config.py delete mode 100644 addons/sales_team/res_config_view.xml diff --git a/addons/account/report/account_invoice_report_view.xml b/addons/account/report/account_invoice_report_view.xml index 54dbcce0c76..c5a76f0ca1e 100644 --- a/addons/account/report/account_invoice_report_view.xml +++ b/addons/account/report/account_invoice_report_view.xml @@ -84,7 +84,7 @@ - + diff --git a/addons/crm/crm_demo.xml b/addons/crm/crm_demo.xml index e7b19415a49..be18b00a75c 100644 --- a/addons/crm/crm_demo.xml +++ b/addons/crm/crm_demo.xml @@ -12,16 +12,7 @@ Indirect Sales - IM - - - Marketing - SPD - - - - diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 45848d5fffc..5f3caf239b8 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -295,7 +295,7 @@ class crm_lead(format_address, osv.osv): """ When changing the user, also set a team_id or restrict team id to the ones user_id is member of. """ team_id = self.pool['crm.team']._get_default_team_id(cr, uid, user_id=user_id, context=context) - if user_id and not team_id and self.pool['res.users'].has_group(cr, uid, 'base.group_multi_salesteams'): + if user_id and not team_id: team_ids = self.pool.get('crm.team').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context) if team_ids: team_id = team_ids[0] diff --git a/addons/crm/crm_lead_demo.xml b/addons/crm/crm_lead_demo.xml index 3904637a905..9afea7ed844 100644 --- a/addons/crm/crm_lead_demo.xml +++ b/addons/crm/crm_lead_demo.xml @@ -106,7 +106,7 @@ Could you please send me the details ? Drury 2 - + @@ -160,7 +160,7 @@ Contact: +1 813 494 5005 Roma 2 - + @@ -180,7 +180,7 @@ Contact: +1 813 494 5005 0 - + @@ -239,7 +239,7 @@ Contact: +1 813 494 5005 Sevilla 2 - + Hi, @@ -521,7 +521,7 @@ Andrew 2 - + @@ -541,7 +541,7 @@ Andrew 1 - + @@ -630,7 +630,7 @@ Andrew Send Catalogue by Email - + diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 5ba5b7412ac..43c311feadc 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -47,7 +47,7 @@
- +
@@ -59,7 +59,7 @@ - + @@ -149,8 +149,8 @@ -