Browse Source

[MIG] crm_deduplicate_by_website

14.0
Cris Martín 6 years ago
committed by mariadforgeflow
parent
commit
34b8b27dc7
  1. 81
      partner_deduplicate_by_website/README.rst
  2. 1
      partner_deduplicate_by_website/__init__.py
  3. 10
      partner_deduplicate_by_website/__manifest__.py
  4. 1
      partner_deduplicate_by_website/tests/__init__.py
  5. 43
      partner_deduplicate_by_website/tests/test_crm_deduplicate_by_website.py
  6. 1
      partner_deduplicate_by_website/wizards/__init__.py
  7. 5
      partner_deduplicate_by_website/wizards/partner_merge.py
  8. 4
      partner_deduplicate_by_website/wizards/partner_merge_view.xml

81
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
<https://github.com/OCA/crm/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 <https://github.com/OCA/crm/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 <https://github.com/OCA/crm/issues/new?body=module:%20crm_deduplicate_by_website%0Aversion:%2011.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
Credits
=======
Images
------
Authors
~~~~~~~
* `Arrow <https://openclipart.org/detail/131875/convergent>`_.
* Tecnativa
Contributors
------------
~~~~~~~~~~~~
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Vicent Cubells <vicent.cubells@tecnativa.com>
* `Tecnativa <https://www.tecnativa.com>`__:
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 <https://github.com/OCA/crm/tree/11.0/crm_deduplicate_by_website>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

1
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

10
partner_deduplicate_by_website/__openerp__.py → partner_deduplicate_by_website/__manifest__.py

@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# Copyright 2017 Vicent Cubells <vicent.cubells@tecnativa.com>
# 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",

1
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

43
partner_deduplicate_by_website/tests/test_crm_deduplicate_by_website.py

@ -1,30 +1,35 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# 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)

1
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).

5
partner_deduplicate_by_website/wizards/partner_merge.py

@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# 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):

4
partner_deduplicate_by_website/wizards/partner_merge_view.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
Copyright 2017 Vicent Cubells <vicent.cubells@tecnativa.com>
<!-- Copyright 2016 Tecnativa - Pedro M. Baeza
Copyright 2017 Tecnativa - Vicent Cubells
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo>

Loading…
Cancel
Save