diff options
| author | qmo-odoo <qmo@odoo.com> | 2018-10-16 08:43:33 +0000 |
|---|---|---|
| committer | qmo-odoo <qmo@odoo.com> | 2018-12-05 15:32:53 +0000 |
| commit | 1da63f0ab0fb4212bee46f960c6bbe8ca9251cac (patch) | |
| tree | f324d0acc78a8c0f8c14a90edd303539399f71d5 /addons/website_crm/models | |
| parent | e1f9499d2672fb0a346f8ac74552f038f5204a64 (diff) | |
[IMP] salesteam: Simplify sales team config and improved team dashboard
Reason:
*Sales team configuration is too complex with fields you
don't understand and that bring no added value
*Remove the team type, every team should be able to handle
a POS or a website for example
Contains:
*Removal of the team_type, use_quotations, use_leads fields
*Removal of the graph configuration fields
*Adapting the filters that were based on the team_type
*Clear distinction between the team dashboard behavior in crm
from the one in sales
*Cleansing of now dead code due to the removal of the previously
mentionned fields
Task: #1830105
Enterprise PR: #3006
Closes: #28063
Diffstat (limited to 'addons/website_crm/models')
| -rw-r--r-- | addons/website_crm/models/crm_lead.py | 5 | ||||
| -rw-r--r-- | addons/website_crm/models/res_config_settings.py | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/addons/website_crm/models/crm_lead.py b/addons/website_crm/models/crm_lead.py index b680e8599fc..f3b739101da 100644 --- a/addons/website_crm/models/crm_lead.py +++ b/addons/website_crm/models/crm_lead.py @@ -22,10 +22,9 @@ class Website(models.Model): _inherit = 'website' def _get_crm_default_team_domain(self): - if self.env.user.has_group('crm.group_use_lead'): - return [('use_leads', '=', True)] - else: + if not self.env.user.has_group('crm.group_use_lead'): return [('use_opportunities', '=', True)] + return [] crm_default_team_id = fields.Many2one( 'crm.team', string='Default Sales Teams', diff --git a/addons/website_crm/models/res_config_settings.py b/addons/website_crm/models/res_config_settings.py index f9b3f1c2c33..11cd082db8c 100644 --- a/addons/website_crm/models/res_config_settings.py +++ b/addons/website_crm/models/res_config_settings.py @@ -7,10 +7,9 @@ class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' def _get_crm_default_team_domain(self): - if self.env.user.has_group('crm.group_use_lead'): - return [('use_leads', '=', True)] - else: + if not self.env.user.has_group('crm.group_use_lead'): return [('use_opportunities', '=', True)] + return [] crm_default_team_id = fields.Many2one( 'crm.team', string='Default Sales Team', related='website_id.crm_default_team_id', readonly=False, |
