From 9e430e9bc3ac973fe30d0a3c389b5b60dd89b0c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Thu, 13 Sep 2018 17:34:36 +0200 Subject: [PATCH] [REF] crm: remove archive-related filters Purpose of this commit is to remove filters and actions linked to archive and restore. Won / Lost filters are sufficient now as archive behavior has been removed. Using the newly-introduced archivable option in kanban view we now hide the archive / restore buttons present in the columns of leads kanban view. Indeed people should go through the mark as won / mark as lost flow and not use the archive feature. In kanban view actions in vignette dropdown are also removed. Finally some dead action code can now be removed. This commit is linked to task ID 1880051 and PR #26977. --- addons/crm/models/crm_lead.py | 8 -------- addons/crm/report/crm_opportunity_report_views.xml | 3 --- addons/crm/views/crm_lead_views.xml | 9 ++++----- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index a68cc5ae48d..16be1c0160b 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -354,14 +354,6 @@ class Lead(models.Model): """ Lost semantic: probability = 0, active = False """ return self.write({'probability': 0, 'active': False}) - @api.multi - def action_set_active(self): - return self.write({'active': True}) - - @api.multi - def action_set_unactive(self): - return self.write({'active': False}) - @api.multi def action_set_won(self): """ Won semantic: probability = 100 (active untouched) """ diff --git a/addons/crm/report/crm_opportunity_report_views.xml b/addons/crm/report/crm_opportunity_report_views.xml index 07329f850bb..d263b5bc8b0 100644 --- a/addons/crm/report/crm_opportunity_report_views.xml +++ b/addons/crm/report/crm_opportunity_report_views.xml @@ -75,9 +75,6 @@ - - - diff --git a/addons/crm/views/crm_lead_views.xml b/addons/crm/views/crm_lead_views.xml index 6f77105f968..f4a5ba6ca19 100644 --- a/addons/crm/views/crm_lead_views.xml +++ b/addons/crm/views/crm_lead_views.xml @@ -176,7 +176,7 @@ crm.lead - + @@ -313,7 +313,8 @@ crm.lead - + @@ -342,8 +343,6 @@ @@ -407,7 +406,7 @@ + domain="['&', ('probability', '=', 0), ('active', '=', False)]"/>