From 7a744ec693d400af3f1b5c114be723e47f8fa87c Mon Sep 17 00:00:00 2001 From: David Date: Wed, 26 Sep 2018 13:20:56 +0200 Subject: [PATCH] [MIG] crm_deduplicate_by_ref: Migration to 11.0 --- partner_deduplicate_by_ref/README.rst | 71 +++++++++++++------ partner_deduplicate_by_ref/__init__.py | 1 - .../{__openerp__.py => __manifest__.py} | 7 +- .../readme/CONTRIBUTORS.rst | 4 ++ .../readme/DESCRIPTION.rst | 2 + partner_deduplicate_by_ref/readme/USAGE.rst | 6 ++ partner_deduplicate_by_ref/tests/__init__.py | 1 - .../tests/test_crm_deduplicate_by_ref.py | 9 ++- .../wizards/__init__.py | 2 - .../wizards/partner_merge.py | 1 - 10 files changed, 67 insertions(+), 37 deletions(-) rename partner_deduplicate_by_ref/{__openerp__.py => __manifest__.py} (80%) create mode 100644 partner_deduplicate_by_ref/readme/CONTRIBUTORS.rst create mode 100644 partner_deduplicate_by_ref/readme/DESCRIPTION.rst create mode 100644 partner_deduplicate_by_ref/readme/USAGE.rst diff --git a/partner_deduplicate_by_ref/README.rst b/partner_deduplicate_by_ref/README.rst index 48cda88b1..7023b170a 100644 --- a/partner_deduplicate_by_ref/README.rst +++ b/partner_deduplicate_by_ref/README.rst @@ -1,14 +1,38 @@ -.. 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 reference ================================= +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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_ref + :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_ref + :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 reference. +**Table of contents** + +.. contents:: + :local: + Usage ===== @@ -19,42 +43,45 @@ To use this module, you need to: 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 +* `Tecnativa `_: -Maintainer ----------- + * Pedro Baeza + * David Vidal + +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_ref/__init__.py b/partner_deduplicate_by_ref/__init__.py index f8944f05c..2d2a05ce9 100644 --- a/partner_deduplicate_by_ref/__init__.py +++ b/partner_deduplicate_by_ref/__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_ref/__openerp__.py b/partner_deduplicate_by_ref/__manifest__.py similarity index 80% rename from partner_deduplicate_by_ref/__openerp__.py rename to partner_deduplicate_by_ref/__manifest__.py index 4c5915ed8..23cbd8d26 100644 --- a/partner_deduplicate_by_ref/__openerp__.py +++ b/partner_deduplicate_by_ref/__manifest__.py @@ -1,18 +1,15 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - { "name": "Deduplicate Contacts by reference", - "version": "9.0.1.0.0", + "version": "11.0.1.0.0", "category": "Tools", - "website": "https://www.tecnativa.com", + "website": "https://www.github.com/OCA/crm", "author": "Tecnativa, " "Odoo Community Association (OCA)", "license": "AGPL-3", "installable": True, "depends": [ - "crm", "crm_deduplicate_acl", ], "data": [ diff --git a/partner_deduplicate_by_ref/readme/CONTRIBUTORS.rst b/partner_deduplicate_by_ref/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..758e01f87 --- /dev/null +++ b/partner_deduplicate_by_ref/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* `Tecnativa `_: + + * Pedro Baeza + * David Vidal diff --git a/partner_deduplicate_by_ref/readme/DESCRIPTION.rst b/partner_deduplicate_by_ref/readme/DESCRIPTION.rst new file mode 100644 index 000000000..e85a58959 --- /dev/null +++ b/partner_deduplicate_by_ref/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module extends the criteria to match duplicated contacts using the field +reference. diff --git a/partner_deduplicate_by_ref/readme/USAGE.rst b/partner_deduplicate_by_ref/readme/USAGE.rst new file mode 100644 index 000000000..803988f0e --- /dev/null +++ b/partner_deduplicate_by_ref/readme/USAGE.rst @@ -0,0 +1,6 @@ +To use this module, you need to: + +#. Go to *Sales > Tools > Deduplicate Contacts*. +#. Mark "Reference" in the section "Search duplicates based on duplicated data + in". +#. This criteria will be used for deduplicating. diff --git a/partner_deduplicate_by_ref/tests/__init__.py b/partner_deduplicate_by_ref/tests/__init__.py index 0e3f4a7d8..9709e8513 100644 --- a/partner_deduplicate_by_ref/tests/__init__.py +++ b/partner_deduplicate_by_ref/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_ref diff --git a/partner_deduplicate_by_ref/tests/test_crm_deduplicate_by_ref.py b/partner_deduplicate_by_ref/tests/test_crm_deduplicate_by_ref.py index 717fb0eeb..769b5c2dc 100644 --- a/partner_deduplicate_by_ref/tests/test_crm_deduplicate_by_ref.py +++ b/partner_deduplicate_by_ref/tests/test_crm_deduplicate_by_ref.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Pedro M. Baeza # 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 TestDeduplicateByRef(common.TransactionCase): @@ -24,7 +23,7 @@ class TestDeduplicateByRef(common.TransactionCase): wizard = self.env['base.partner.merge.automatic.wizard'].create({ 'group_by_ref': 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 +38,7 @@ class TestDeduplicateByRef(common.TransactionCase): 'group_by_ref': 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_ref/wizards/__init__.py b/partner_deduplicate_by_ref/wizards/__init__.py index c93eadfed..fa92260c9 100644 --- a/partner_deduplicate_by_ref/wizards/__init__.py +++ b/partner_deduplicate_by_ref/wizards/__init__.py @@ -1,5 +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). from . import partner_merge diff --git a/partner_deduplicate_by_ref/wizards/partner_merge.py b/partner_deduplicate_by_ref/wizards/partner_merge.py index e39a9da50..c930600a0 100644 --- a/partner_deduplicate_by_ref/wizards/partner_merge.py +++ b/partner_deduplicate_by_ref/wizards/partner_merge.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2016 Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).