diff --git a/addons/base_automation/__manifest__.py b/addons/base_automation/__manifest__.py index 82d32552ecb..32a01918be8 100644 --- a/addons/base_automation/__manifest__.py +++ b/addons/base_automation/__manifest__.py @@ -12,7 +12,7 @@ This module allows to implement action rules for any object. Use automated actions to automatically trigger actions for various screens. **Example:** A lead created by a specific user may be automatically set to a specific -sales channel, or an opportunity which still has status pending after 14 days might +Sales Team, or an opportunity which still has status pending after 14 days might trigger an automatic reminder email. """, 'depends': ['base', 'resource', 'mail'], diff --git a/addons/base_automation/views/base_automation_view.xml b/addons/base_automation/views/base_automation_view.xml index 7f1dfb861cd..d767585b10c 100644 --- a/addons/base_automation/views/base_automation_view.xml +++ b/addons/base_automation/views/base_automation_view.xml @@ -84,7 +84,7 @@

Use automated actions to automatically trigger actions for various screens. Example: a lead created by a specific user may - be automatically set to a specific sales channel, or an + be automatically set to a specific Sales Team, or an opportunity which still has status pending after 14 days might trigger an automatic reminder email.

diff --git a/addons/board/static/description/index.html b/addons/board/static/description/index.html index fe62be91641..ce63188453e 100644 --- a/addons/board/static/description/index.html +++ b/addons/board/static/description/index.html @@ -40,7 +40,7 @@ After creating reports in each Odoo app, you can choose to make them as Favorite

-In each Odoo App, you can create detailed reports and graphs in any format you like without the need of an external program. Get statistics on any numbers in your company, from fuel costs in projects all the way to revenues in sales channels, and with inventory, and everything in between. +In each Odoo App, you can create detailed reports and graphs in any format you like without the need of an external program. Get statistics on any numbers in your company, from fuel costs in projects all the way to revenues in Sales Teams, and with inventory, and everything in between.

diff --git a/addons/crm/README.md b/addons/crm/README.md index 8f65b125b82..ff7e568d5c7 100644 --- a/addons/crm/README.md +++ b/addons/crm/README.md @@ -19,7 +19,7 @@ Lead Management Made Easy ------------------------- Create leads automatically from incoming emails. Analyse leads efficiency and -compare performance by campaigns, channels or sales channel. +compare performance by campaigns, channels or Sales Team. Find duplicates, merge leads and assign them to the right salesperson in one operation. Spend less time on administration and more time on qualifying leads. @@ -42,7 +42,7 @@ company uses Microsoft Outlook or Gmail, no one needs to change the way they work, so everyone stays productive. Route, sort and filter incoming emails automatically. Odoo CRM handles incoming -emails and route them to the right opportunities or sales channel. New leads are +emails and route them to the right opportunities or Sales Team. New leads are created on the fly and interested salespersons are notified automatically. Collaborative Agenda @@ -80,12 +80,12 @@ Drive Engagement with Gamification Reinforce good habits and improve win rates with real-time recognition and rewards inspired by [game mechanics](http://en.wikipedia.org/wiki/Gamification). -Align sales channels around clear business objectives with challenges, personal +Align Sales Teams around clear business objectives with challenges, personal objectives and team leader boards. ### Leaderboards -Promote leaders and competition amongst sales channel with performance ratios. +Promote leaders and competition amongst Sales Team with performance ratios. ### Personal Objectives diff --git a/addons/crm/data/crm_lead_data.xml b/addons/crm/data/crm_lead_data.xml index f4e15d318b5..4a287afb4e8 100644 --- a/addons/crm/data/crm_lead_data.xml +++ b/addons/crm/data/crm_lead_data.xml @@ -30,10 +30,10 @@ - Lead Created + Opportunity Created 10 crm.team - + team_id @@ -60,6 +60,11 @@ team_id + + + diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 756a9f272a4..3d57ac3c23b 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -63,23 +63,23 @@ class Lead(models.Model): return self._stage_find(team_id=team.id, domain=[('fold', '=', False)]).id name = fields.Char('Opportunity', required=True, index=True) - partner_id = fields.Many2one('res.partner', string='Customer', track_visibility='onchange', index=True, + partner_id = fields.Many2one('res.partner', string='Customer', track_visibility='onchange', track_sequence=1, index=True, help="Linked partner (optional). Usually created when converting the lead.") active = fields.Boolean('Active', default=True) date_action_last = fields.Datetime('Last Action', readonly=True) - email_from = fields.Char('Email', help="Email address of the contact", index=True) + email_from = fields.Char('Email', help="Email address of the contact", track_visibility='onchange', track_sequence=4, index=True) website = fields.Char('Website', index=True, help="Website of the contact") - team_id = fields.Many2one('crm.team', string='Sales Channel', oldname='section_id', default=lambda self: self.env['crm.team'].sudo()._get_default_team_id(user_id=self.env.uid), - index=True, track_visibility='onchange', help='When sending mails, the default email address is taken from the sales channel.') + team_id = fields.Many2one('crm.team', string='Sales Team', oldname='section_id', default=lambda self: self.env['crm.team'].sudo()._get_default_team_id(user_id=self.env.uid), + index=True, track_visibility='onchange', help='When sending mails, the default email address is taken from the Sales Team.') kanban_state = fields.Selection([('grey', 'No next activity planned'), ('red', 'Next activity late'), ('green', 'Next activity is planned')], string='Kanban State', compute='_compute_kanban_state') email_cc = fields.Text('Global CC', help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma") - description = fields.Text('Notes') + description = fields.Text('Notes', track_visibility='onchange', track_sequence=6) create_date = fields.Datetime('Create Date', readonly=True) write_date = fields.Datetime('Update Date', readonly=True) tag_ids = fields.Many2many('crm.lead.tag', 'crm_lead_tag_rel', 'lead_id', 'tag_id', string='Tags', help="Classify and analyze your lead/opportunity categories like: Training, Service") - contact_name = fields.Char('Contact Name') - partner_name = fields.Char("Customer Name", index=True, help='The name of the future partner company that will be created while converting the lead into opportunity') + contact_name = fields.Char('Contact Name', track_visibility='onchange', track_sequence=3) + partner_name = fields.Char("Customer Name", track_visibility='onchange', track_sequence=2, index=True, help='The name of the future partner company that will be created while converting the lead into opportunity') opt_out = fields.Boolean(string='Opt-Out', oldname='optout', help="If opt-out is checked, this contact has refused to receive emails for mass mailing and marketing campaign. " "Filter 'Available for Mass Mailing' allows users to filter the leads when performing mass mailing.") @@ -124,7 +124,7 @@ class Lead(models.Model): city = fields.Char('City') state_id = fields.Many2one("res.country.state", string='State') country_id = fields.Many2one('res.country', string='Country') - phone = fields.Char('Phone') + phone = fields.Char('Phone', track_visibility='onchange', track_sequence=5) mobile = fields.Char('Mobile') function = fields.Char('Job Position') title = fields.Many2one('res.partner.title') @@ -286,7 +286,7 @@ class Lead(models.Model): @api.model def create(self, vals): - # set up context used to find the lead's sales channel which is needed + # set up context used to find the lead's Sales Team which is needed # to correctly set the default stage_id context = dict(self._context or {}) if vals.get('type') and not self._context.get('default_type'): @@ -647,7 +647,7 @@ class Lead(models.Model): The resulting lead/opportunity will be the most important one (based on its confidence level) updated with values from other opportunities to merge. :param user_id : the id of the saleperson. If not given, will be determined by `_merge_data`. - :param team : the id of the sales channel. If not given, will be determined by `_merge_data`. + :param team : the id of the Sales Team. If not given, will be determined by `_merge_data`. :return crm.lead record resulting of th merge """ if len(self.ids) <= 1: @@ -671,7 +671,7 @@ class Lead(models.Model): # the first (head opp) will be a priority. merged_data = opportunities._merge_data(list(CRM_LEAD_FIELDS_TO_MERGE)) - # force value for saleperson and sales channel + # force value for saleperson and Sales Team if user_id: merged_data['user_id'] = user_id if team_id: @@ -680,7 +680,7 @@ class Lead(models.Model): # merge other data (mail.message, attachments, ...) from tail into head opportunities_head.merge_dependences(opportunities_tail) - # check if the stage is in the stages of the sales channel. If not, assign the stage with the lowest sequence + # check if the stage is in the stages of the Sales Team. If not, assign the stage with the lowest sequence if merged_data.get('team_id'): team_stage_ids = self.env['crm.stage'].search(['|', ('team_id', '=', merged_data['team_id']), ('team_id', '=', False)], order='sequence') if merged_data.get('stage_id') not in team_stage_ids.ids: @@ -726,7 +726,7 @@ class Lead(models.Model): def _convert_opportunity_data(self, customer, team_id=False): """ Extract the data from a lead to create the opportunity :param customer : res.partner record - :param team_id : identifier of the sales channel to determine the stage + :param team_id : identifier of the Sales Team to determine the stage """ if not team_id: team_id = self.team_id.id if self.team_id else False @@ -951,7 +951,7 @@ class Lead(models.Model): return self.message_post(body=message) # ---------------------------------------- - # Sales Channel Dashboard + # Sales Team Dashboard # ---------------------------------------- @api.model @@ -1113,6 +1113,9 @@ class Lead(models.Model): {'url': won_action, 'title': _('Won')}, {'url': lost_action, 'title': _('Lost')}] + if self.team_id: + salesman_actions.append({'url': self._notify_get_action_link('view', res_id=self.team_id.id, model=self.team_id._name), 'title': _('Sales Team Settings')}) + new_group = ( 'group_sale_salesman', lambda partner: bool(partner.user_ids) and any(user.has_group('sales_team.group_sale_salesman') for user in partner.user_ids), { 'actions': salesman_actions, diff --git a/addons/crm/models/crm_stage.py b/addons/crm/models/crm_stage.py index 9bfae1ea120..f2e33c7ca86 100644 --- a/addons/crm/models/crm_stage.py +++ b/addons/crm/models/crm_stage.py @@ -25,7 +25,7 @@ class Stage(models.Model): @api.model def default_get(self, fields): """ Hack : when going from the pipeline, creating a stage with a sales team in - context should not create a stage for the current sales channel only + context should not create a stage for the current Sales Team only """ ctx = dict(self.env.context) if ctx.get('default_team_id') and not ctx.get('crm_team_mono'): @@ -37,7 +37,7 @@ class Stage(models.Model): probability = fields.Float('Probability (%)', required=True, default=10.0, help="This percentage depicts the default/average probability of the Case for this stage to be a success") on_change = fields.Boolean('Change Probability Automatically', help="Setting this stage will change the probability automatically on the opportunity.") requirements = fields.Text('Requirements', help="Enter here the internal requirements for this stage (ex: Offer sent to customer). It will appear as a tooltip over the stage's name.") - team_id = fields.Many2one('crm.team', string='Sales Channel', ondelete='set null', + team_id = fields.Many2one('crm.team', string='Sales Team', ondelete='set null', help='Specific team that uses this stage. Other teams will not be able to see or use this stage.') legend_priority = fields.Text('Priority Management Explanation', translate=True, help='Explanation text to help users using the star and priority mechanism on stages or issues that are in this stage.') diff --git a/addons/crm/models/crm_team.py b/addons/crm/models/crm_team.py index d37d72544bc..7861932346c 100644 --- a/addons/crm/models/crm_team.py +++ b/addons/crm/models/crm_team.py @@ -118,7 +118,7 @@ class Team(models.Model): @api.constrains('dashboard_graph_model', 'use_opportunities') def _check_graph_model(self): if not self.use_opportunities and self.dashboard_graph_model == 'crm.lead': - raise ValidationError(_("You have to enable the Pipeline on your sales channel to be able to set it as a content for the graph")) + raise ValidationError(_("You have to enable the Pipeline on your Sales Team to be able to set it as a content for the graph")) @api.multi def write(self, vals): @@ -136,11 +136,11 @@ class Team(models.Model): if not user_team_id: user_team_id = self.search([], limit=1).id action['help'] = _("""

Add new opportunities

- Looks like you are not a member of a sales channel. You should add yourself - as a member of one of the sales channel. + 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 user_team_id: - action['help'] += "

As you don't belong to any sales channel, Odoo opens the first one by default.

" + action['help'] += "

As you don't belong to any Sales Team, Odoo opens the first one by default.

" action_context = safe_eval(action['context'], {'uid': self.env.uid}) if user_team_id: diff --git a/addons/crm/models/res_partner.py b/addons/crm/models/res_partner.py index 350b2a630e5..c6c581f1729 100644 --- a/addons/crm/models/res_partner.py +++ b/addons/crm/models/res_partner.py @@ -8,7 +8,7 @@ class Partner(models.Model): _inherit = 'res.partner' - team_id = fields.Many2one('crm.team', string='Sales Channel', oldname='section_id') + team_id = fields.Many2one('crm.team', string='Sales Team', oldname='section_id') opportunity_ids = fields.One2many('crm.lead', 'partner_id', string='Opportunities', domain=[('type', '=', 'opportunity')]) meeting_ids = fields.Many2many('calendar.event', 'calendar_event_res_partner_rel', 'res_partner_id', 'calendar_event_id', string='Meetings', copy=False) opportunity_count = fields.Integer("Opportunity", compute='_compute_opportunity_count') diff --git a/addons/crm/report/crm_activity_report.py b/addons/crm/report/crm_activity_report.py index 51d38980d2f..4a9808a6fe4 100644 --- a/addons/crm/report/crm_activity_report.py +++ b/addons/crm/report/crm_activity_report.py @@ -15,7 +15,7 @@ class ActivityReport(models.Model): date = fields.Datetime('Date', readonly=True) author_id = fields.Many2one('res.partner', 'Created By', readonly=True) user_id = fields.Many2one('res.users', 'Salesperson', readonly=True) - team_id = fields.Many2one('crm.team', 'Sales Channel', readonly=True) + team_id = fields.Many2one('crm.team', 'Sales Team', readonly=True) lead_id = fields.Many2one('crm.lead', "Lead", readonly=True) subject = fields.Char('Summary', readonly=True) subtype_id = fields.Many2one('mail.message.subtype', 'Subtype', readonly=True) diff --git a/addons/crm/report/crm_activity_report_views.xml b/addons/crm/report/crm_activity_report_views.xml index 2e5c6642159..05bc8bc8587 100644 --- a/addons/crm/report/crm_activity_report_views.xml +++ b/addons/crm/report/crm_activity_report_views.xml @@ -41,7 +41,7 @@ - + diff --git a/addons/crm/report/crm_opportunity_report_views.xml b/addons/crm/report/crm_opportunity_report_views.xml index 86058e9c5d5..ef869a09b46 100644 --- a/addons/crm/report/crm_opportunity_report_views.xml +++ b/addons/crm/report/crm_opportunity_report_views.xml @@ -121,7 +121,7 @@ - + @@ -172,7 +172,7 @@ teams of the sales pipeline. your opportunities with information such as the expected revenue, planned cost, missed deadlines or the number of interactions per opportunity. This report is mainly used by the sales manager in order to periodically review the pipeline -with the the sales channel. +with the the Sales Team. diff --git a/addons/crm/tests/test_new_lead_notification.py b/addons/crm/tests/test_new_lead_notification.py index 7c9b6d151a3..dedcd02449a 100644 --- a/addons/crm/tests/test_new_lead_notification.py +++ b/addons/crm/tests/test_new_lead_notification.py @@ -8,11 +8,11 @@ class NewLeadNotification(TestCrmCases): def test_new_lead_notification(self): """ Test newly create leads like from the website. People and channels - subscribed to the sales channel shoud be notified. """ - # subscribe a partner and a channel to the sales channel with new lead subtype + subscribed to the Sales Team shoud be notified. """ + # subscribe a partner and a channel to the Sales Team with new lead subtype channel_listen = self.env['mail.channel'].create({'name': 'Listener'}) sales_team_1 = self.env['crm.team'].create({ - 'name': 'Test Sales Channel', + 'name': 'Test Sales Team', 'alias_name': 'test_sales_team', }) diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index e720acda11e..88c171ba8e7 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -412,7 +412,7 @@ ]"/> - + @@ -679,7 +679,7 @@ - + @@ -807,6 +807,12 @@ for rec in records: action="base.action_partner_form" sequence="2"/> + + Leads diff --git a/addons/crm/views/crm_team_views.xml b/addons/crm/views/crm_team_views.xml index c9c7fa8bbd8..6f2c0240484 100644 --- a/addons/crm/views/crm_team_views.xml +++ b/addons/crm/views/crm_team_views.xml @@ -148,7 +148,7 @@ - Cases by Sales Channel + Cases by Sales Team crm.team tree diff --git a/addons/crm/views/crm_views.xml b/addons/crm/views/crm_views.xml index fa448e9cb8a..59a07dfb804 100644 --- a/addons/crm/views/crm_views.xml +++ b/addons/crm/views/crm_views.xml @@ -47,7 +47,7 @@ groups="sales_team.group_sale_manager"/> @@ -58,11 +58,4 @@ action="sales_team.mail_activity_type_action_config_sales" sequence="10"/> - - - diff --git a/addons/crm/views/res_config_settings_views.xml b/addons/crm/views/res_config_settings_views.xml index aa17161697b..6ff4711757c 100644 --- a/addons/crm/views/res_config_settings_views.xml +++ b/addons/crm/views/res_config_settings_views.xml @@ -25,7 +25,7 @@
@@ -34,7 +34,7 @@
-
+
Assignation
@@ -377,7 +377,7 @@
-
diff --git a/doc/reference/mixins.rst b/doc/reference/mixins.rst index ae73a887e06..270dec856b7 100644 --- a/doc/reference/mixins.rst +++ b/doc/reference/mixins.rst @@ -551,7 +551,7 @@ Alias support integration Aliases are usually configured on a parent model which will then create specific record when contacted by e-mail. For example, Project have aliases to create tasks -or issues, Sales Channel have aliases to generate Leads. +or issues, Sales Team have aliases to generate Leads. .. note:: The model that will be created by the alias **must** inherit the ``mail_thread`` model.