From 0e601ebeb96a74f60be85fca86d9563c61418867 Mon Sep 17 00:00:00 2001 From: Umesh Gupta Date: Wed, 16 Feb 2022 13:10:55 +0000 Subject: [PATCH] [IMP] website_crm_partner_assign: allow archiving partner activation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, for the better first user experience, few partner activation levels are available by default (added in data files). Since there is no way to archive it, the only way to not use them in your production is to delete it. But it means that on each migration, it will be restored. To improve that, this commit introduces 'active' field in the activation levels so that one can easily archive them if they are of no use, and this way they won't be again created every time when db is migrated. This commit also adds a search view with 'Archived' filter to see the archived activation levels easily. taskID-2753985 closes odoo/odoo#84401 Signed-off-by: Warnon Aurélien (awa) --- addons/website_crm_partner_assign/__manifest__.py | 2 +- .../models/res_partner_activation.py | 1 + .../views/res_partner_activation_views.xml | 12 ++++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/addons/website_crm_partner_assign/__manifest__.py b/addons/website_crm_partner_assign/__manifest__.py index e7d48ee22c9..05ef65bc1ea 100644 --- a/addons/website_crm_partner_assign/__manifest__.py +++ b/addons/website_crm_partner_assign/__manifest__.py @@ -5,7 +5,7 @@ 'name': 'Resellers', 'category': 'Website/Website', 'summary': 'Publish your resellers/partners and forward leads to them', - 'version': '1.1', + 'version': '1.2', 'description': """ This module allows to publish your resellers/partners on your website and to forward incoming leads/opportunities to them. diff --git a/addons/website_crm_partner_assign/models/res_partner_activation.py b/addons/website_crm_partner_assign/models/res_partner_activation.py index aac9ebde8fd..3f4b3cddb19 100644 --- a/addons/website_crm_partner_assign/models/res_partner_activation.py +++ b/addons/website_crm_partner_assign/models/res_partner_activation.py @@ -11,3 +11,4 @@ class ResPartnerActivation(models.Model): sequence = fields.Integer('Sequence') name = fields.Char('Name', required=True) + active = fields.Boolean(default=True) diff --git a/addons/website_crm_partner_assign/views/res_partner_activation_views.xml b/addons/website_crm_partner_assign/views/res_partner_activation_views.xml index 4f49f6cfbef..2c45603f070 100644 --- a/addons/website_crm_partner_assign/views/res_partner_activation_views.xml +++ b/addons/website_crm_partner_assign/views/res_partner_activation_views.xml @@ -21,10 +21,22 @@ + + + res.partner.activation.view.search + res.partner.activation + + + + + + + + Partner Activations res.partner.activation