diff --git a/partner_deduplicate_by_website/README.rst b/partner_deduplicate_by_website/README.rst index 0406eeeb9..12e0693df 100644 --- a/partner_deduplicate_by_website/README.rst +++ b/partner_deduplicate_by_website/README.rst @@ -1,61 +1,86 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -=============================== +================================== Deduplicate Contacts by website -=============================== +================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github + :target: https://github.com/OCA/crm/tree/11.0/crm_deduplicate_by_website + :alt: OCA/crm +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/crm-11-0/crm-11-0-crm_deduplicate_by_website + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/111/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| This module extends the criteria to match duplicated contacts using the field website. +**Table of contents** + +.. contents:: + :local: + Usage ===== -To use this module, you need to: - -#. Go to *Sales > Tools > Deduplicate Contacts*. +#. Go to *CRM > Tools > Deduplicate Contacts*. #. Mark "Website" in the section "Search duplicates based on duplicated data in". #. This criteria will be used for deduplicating. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/111/9.0 - Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* `Arrow `_. +* Tecnativa Contributors ------------- +~~~~~~~~~~~~ -* Pedro M. Baeza -* Vicent Cubells +* `Tecnativa `__: -Maintainer ----------- + * Pedro M. Baeza + * Vicent Cubells + * Cristina Martin + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/crm `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_deduplicate_by_website/__init__.py b/partner_deduplicate_by_website/__init__.py index f8944f05c..2d2a05ce9 100644 --- a/partner_deduplicate_by_website/__init__.py +++ b/partner_deduplicate_by_website/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import wizards diff --git a/partner_deduplicate_by_website/__openerp__.py b/partner_deduplicate_by_website/__manifest__.py similarity index 65% rename from partner_deduplicate_by_website/__openerp__.py rename to partner_deduplicate_by_website/__manifest__.py index 01983176d..8d1bc2f7b 100644 --- a/partner_deduplicate_by_website/__openerp__.py +++ b/partner_deduplicate_by_website/__manifest__.py @@ -1,13 +1,13 @@ -# -*- coding: utf-8 -*- -# Copyright 2016 Pedro M. Baeza -# Copyright 2017 Vicent Cubells +# Copyright 2016 Tecnativa - Pedro M. Baeza +# Copyright 2017 Tecnativa - Vicent Cubells +# Copyright 2018 Tecnativa - Cristina Martin # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Deduplicate Contacts by Website", - "version": "9.0.1.0.0", + "version": "11.0.1.0.0", "category": "Tools", - "website": "https://www.tecnativa.com", + "website": "https://github.com/OCA/crm", "author": "Tecnativa, " "Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/partner_deduplicate_by_website/tests/__init__.py b/partner_deduplicate_by_website/tests/__init__.py index fd9064d3e..a38181564 100644 --- a/partner_deduplicate_by_website/tests/__init__.py +++ b/partner_deduplicate_by_website/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_crm_deduplicate_by_website diff --git a/partner_deduplicate_by_website/tests/test_crm_deduplicate_by_website.py b/partner_deduplicate_by_website/tests/test_crm_deduplicate_by_website.py index 316b3946c..3bfb10277 100644 --- a/partner_deduplicate_by_website/tests/test_crm_deduplicate_by_website.py +++ b/partner_deduplicate_by_website/tests/test_crm_deduplicate_by_website.py @@ -1,30 +1,35 @@ -# -*- coding: utf-8 -*- -# Copyright 2016 Pedro M. Baeza +# Copyright 2016 Tecnativa - Pedro M. Baeza +# Copyright 2018 Tecnativa - Cristina Martin # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp.tests import common -from openerp.tools.safe_eval import safe_eval +from odoo.tests import common +from odoo.tools.safe_eval import safe_eval -class TestDeduplicateByWebsite(common.TransactionCase): - def setUp(self): - super(TestDeduplicateByWebsite, self).setUp() - self.partner_1 = self.env['res.partner'].create({ - 'name': 'Partner 1', - 'website': 'www.test-deduplicate.com', - 'email': 'test@deduplicate.com', - }) - self.partner_2 = self.env['res.partner'].create({ - 'name': 'Partner 2', - 'website': 'www.test-deduplicate.com', - 'email': 'test@deduplicate.com', - }) +class TestDeduplicateByWebsite(common.SavepointCase): + + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.partner_1 = cls.env['res.partner'].with_context( + tracking_disable=True).create({ + 'name': 'Partner 1', + 'website': 'www.test-deduplicate.com', + 'email': 'test@deduplicate.com', + }) + + cls.partner_2 = cls.env['res.partner'].with_context( + tracking_disable=True).create({ + 'name': 'Partner 2', + 'website': 'www.test-deduplicate.com', + 'email': 'test@deduplicate.com', + }) def test_deduplicate_by_website(self): wizard = self.env['base.partner.merge.automatic.wizard'].create({ 'group_by_website': True, }) - wizard.start_process_cb() + wizard.action_start_manual_process() found_match = False for line in wizard.line_ids: match_ids = safe_eval(line.aggr_ids) @@ -39,7 +44,7 @@ class TestDeduplicateByWebsite(common.TransactionCase): 'group_by_website': True, 'group_by_email': True, }) - wizard.start_process_cb() + wizard.action_start_manual_process() found_match = False for line in wizard.line_ids: match_ids = safe_eval(line.aggr_ids) diff --git a/partner_deduplicate_by_website/wizards/__init__.py b/partner_deduplicate_by_website/wizards/__init__.py index c93eadfed..4415a7524 100644 --- a/partner_deduplicate_by_website/wizards/__init__.py +++ b/partner_deduplicate_by_website/wizards/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Antiun Ingeniería S.L. - Jairo Llopis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/partner_deduplicate_by_website/wizards/partner_merge.py b/partner_deduplicate_by_website/wizards/partner_merge.py index 2e5388eeb..90b2e6499 100644 --- a/partner_deduplicate_by_website/wizards/partner_merge.py +++ b/partner_deduplicate_by_website/wizards/partner_merge.py @@ -1,8 +1,7 @@ -# -*- coding: utf-8 -*- -# Copyright 2016 Pedro M. Baeza +# Copyright 2016 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import fields, models +from odoo import fields, models class BasePartnerMergeAutomaticWizard(models.TransientModel): diff --git a/partner_deduplicate_by_website/wizards/partner_merge_view.xml b/partner_deduplicate_by_website/wizards/partner_merge_view.xml index e2d1fac26..797260760 100644 --- a/partner_deduplicate_by_website/wizards/partner_merge_view.xml +++ b/partner_deduplicate_by_website/wizards/partner_merge_view.xml @@ -1,6 +1,6 @@ -