diff --git a/addons/crm/__manifest__.py b/addons/crm/__manifest__.py index 8c7a6a892f5..839a1e70ef3 100644 --- a/addons/crm/__manifest__.py +++ b/addons/crm/__manifest__.py @@ -26,33 +26,35 @@ 'security/crm_security.xml', 'security/ir.model.access.csv', - 'data/crm_data.xml', - 'data/crm_stage_data.xml', - 'data/crm_lead_data.xml', - 'data/digest_data.xml', 'data/crm_lead_prediction_data.xml', + 'data/crm_lost_reason_data.xml', + 'data/crm_stage_data.xml', + 'data/crm_team_data.xml', + 'data/digest_data.xml', + 'data/mail_data.xml', 'wizard/crm_lead_lost_views.xml', 'wizard/crm_lead_to_opportunity_views.xml', 'wizard/crm_lead_to_opportunity_mass_views.xml', 'wizard/crm_merge_opportunities_views.xml', - 'views/crm_templates.xml', - 'views/res_config_settings_views.xml', - 'views/crm_views.xml', + 'views/assets.xml', + 'views/calendar_views.xml', + 'views/crm_menu_views.xml', 'views/crm_lost_reason_views.xml', 'views/crm_stage_views.xml', 'views/crm_lead_views.xml', - 'views/calendar_views.xml', + 'views/digest_views.xml', + 'views/mail_activity_views.xml', + 'views/res_config_settings_views.xml', 'views/res_partner_views.xml', + 'views/utm_campaign_views.xml', 'report/crm_activity_report_views.xml', 'report/crm_opportunity_report_views.xml', 'views/crm_team_views.xml', - 'views/digest_views.xml', - 'views/utm_campaign_views.xml' ], 'demo': [ - 'data/crm_demo.xml', + 'data/crm_team_demo.xml', 'data/mail_activity_demo.xml', 'data/crm_lead_demo.xml', ], diff --git a/addons/crm/data/crm_data.xml b/addons/crm/data/crm_data.xml deleted file mode 100644 index 0ee888fea90..00000000000 --- a/addons/crm/data/crm_data.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - Too expensive - - - We don't have people/skills - - - Not enough stock - - - diff --git a/addons/crm/data/crm_lost_reason_data.xml b/addons/crm/data/crm_lost_reason_data.xml new file mode 100644 index 00000000000..a13a1d77b34 --- /dev/null +++ b/addons/crm/data/crm_lost_reason_data.xml @@ -0,0 +1,13 @@ + + + + + Too expensive + + + We don't have people/skills + + + Not enough stock + + diff --git a/addons/crm/data/crm_team_data.xml b/addons/crm/data/crm_team_data.xml new file mode 100644 index 00000000000..016777ce78f --- /dev/null +++ b/addons/crm/data/crm_team_data.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/addons/crm/data/crm_demo.xml b/addons/crm/data/crm_team_demo.xml similarity index 67% rename from addons/crm/data/crm_demo.xml rename to addons/crm/data/crm_team_demo.xml index f5f0ed06bed..f04c60baa30 100644 --- a/addons/crm/data/crm_demo.xml +++ b/addons/crm/data/crm_team_demo.xml @@ -1,14 +1,9 @@ - - - - sales - diff --git a/addons/crm/data/crm_lead_data.xml b/addons/crm/data/mail_data.xml similarity index 92% rename from addons/crm/data/crm_lead_data.xml rename to addons/crm/data/mail_data.xml index 52f7575aa79..28253e529b5 100644 --- a/addons/crm/data/crm_lead_data.xml +++ b/addons/crm/data/mail_data.xml @@ -1,6 +1,13 @@ + + + + + + + diff --git a/addons/crm/models/crm_team.py b/addons/crm/models/crm_team.py index 25b1965de97..9161c69116c 100644 --- a/addons/crm/models/crm_team.py +++ b/addons/crm/models/crm_team.py @@ -15,7 +15,9 @@ class Team(models.Model): use_leads = fields.Boolean('Leads', help="Check this box to filter and qualify incoming requests as leads before converting them into opportunities and assigning them to a salesperson.") use_opportunities = fields.Boolean('Pipeline', default=True, help="Check this box to manage a presales process with opportunities.") - alias_id = fields.Many2one('mail.alias', string='Alias', ondelete="restrict", required=True, help="The email address associated with this channel. New emails received will automatically create new leads assigned to the channel.") + alias_id = fields.Many2one( + 'mail.alias', string='Alias', ondelete="restrict", required=True, + help="The email address associated with this channel. New emails received will automatically create new leads assigned to the channel.") # statistics about leads / opportunities / both lead_unassigned_count = fields.Integer( string='# Unassigned Leads', compute='_compute_lead_unassigned_count') @@ -118,6 +120,7 @@ class Team(models.Model): if not use_leads and not use_opportunities: return {'alias_name': False} return {} + # ------------------------------------------------------------ # MESSAGING # ------------------------------------------------------------ @@ -162,7 +165,7 @@ class Team(models.Model): return action def _compute_dashboard_button_name(self): - super(Team,self)._compute_dashboard_button_name() + super(Team, self)._compute_dashboard_button_name() team_with_pipelines = self.filtered(lambda el: el.use_opportunities) team_with_pipelines.update({'dashboard_button_name': _("Pipeline")}) diff --git a/addons/crm/report/crm_opportunity_report_views.xml b/addons/crm/report/crm_opportunity_report_views.xml index cf6eec4bfc7..1d6972d0aaf 100644 --- a/addons/crm/report/crm_opportunity_report_views.xml +++ b/addons/crm/report/crm_opportunity_report_views.xml @@ -123,11 +123,9 @@ teams of the sales pipeline. - + + + Leads Analysis @@ -142,12 +140,8 @@ This report analyses the source of your leads. - + + + diff --git a/addons/crm/views/crm_templates.xml b/addons/crm/views/assets.xml similarity index 100% rename from addons/crm/views/crm_templates.xml rename to addons/crm/views/assets.xml diff --git a/addons/crm/views/calendar_views.xml b/addons/crm/views/calendar_views.xml index b82569b1845..8267a60558d 100644 --- a/addons/crm/views/calendar_views.xml +++ b/addons/crm/views/calendar_views.xml @@ -1,11 +1,6 @@ - - calendar.event.form.inherit calendar.event diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index b7d86291efb..5edbfb84020 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -767,28 +767,6 @@ if record: - - - - - - - Leads @@ -839,12 +817,9 @@ if record: - + + + @@ -948,22 +923,10 @@ if record: - - - - - + + + + + + diff --git a/addons/crm/views/crm_lost_reason_views.xml b/addons/crm/views/crm_lost_reason_views.xml index 7f65379bcc0..33986e14da8 100644 --- a/addons/crm/views/crm_lost_reason_views.xml +++ b/addons/crm/views/crm_lost_reason_views.xml @@ -69,9 +69,7 @@ - + + + diff --git a/addons/crm/views/crm_menu_views.xml b/addons/crm/views/crm_menu_views.xml index cbcfe85b201..e679fb8f122 100644 --- a/addons/crm/views/crm_menu_views.xml +++ b/addons/crm/views/crm_menu_views.xml @@ -1,26 +1,126 @@ - + - - + + + - + + + + + - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/crm/views/crm_stage_views.xml b/addons/crm/views/crm_stage_views.xml index 95e2a321990..2dc3a4c7c10 100644 --- a/addons/crm/views/crm_stage_views.xml +++ b/addons/crm/views/crm_stage_views.xml @@ -71,12 +71,8 @@ - + + + diff --git a/addons/crm/views/crm_team_views.xml b/addons/crm/views/crm_team_views.xml index 90301bc7385..a1981660cc3 100644 --- a/addons/crm/views/crm_team_views.xml +++ b/addons/crm/views/crm_team_views.xml @@ -268,9 +268,4 @@ - - ['|', ('res_model_id', '=', False), ('res_model_id.model', 'in', ['crm.lead', 'res.partner'])] - {'default_res_model': 'crm.lead'} - - diff --git a/addons/crm/views/crm_views.xml b/addons/crm/views/crm_views.xml deleted file mode 100644 index 59a07dfb804..00000000000 --- a/addons/crm/views/crm_views.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/addons/crm/views/mail_activity_views.xml b/addons/crm/views/mail_activity_views.xml new file mode 100644 index 00000000000..6b489ee8807 --- /dev/null +++ b/addons/crm/views/mail_activity_views.xml @@ -0,0 +1,7 @@ + + + + ['|', ('res_model_id', '=', False), ('res_model_id.model', 'in', ['crm.lead', 'res.partner'])] + {'default_res_model': 'crm.lead'} + + diff --git a/addons/crm/views/res_config_settings_views.xml b/addons/crm/views/res_config_settings_views.xml index f0cabe5d527..d2ff6b19c98 100644 --- a/addons/crm/views/res_config_settings_views.xml +++ b/addons/crm/views/res_config_settings_views.xml @@ -133,4 +133,9 @@ inline {'module' : 'crm'} + + + + +