Browse Source

[MIG] partner_deduplicate_acl: Migration to 13.0

14.0
Kevin Khao 5 years ago
committed by Carlos Roca
parent
commit
c238d5d6ed
  1. 11
      partner_deduplicate_acl/README.rst
  2. 2
      partner_deduplicate_acl/__init__.py
  3. 4
      partner_deduplicate_acl/__manifest__.py
  4. 7
      partner_deduplicate_acl/i18n/partner_deduplicate_acl.pot
  5. 1
      partner_deduplicate_acl/readme/CONTRIBUTORS.rst
  6. 22
      partner_deduplicate_acl/security/partner_deduplicate_acl_security.xml
  7. 7
      partner_deduplicate_acl/static/description/index.html
  8. 4
      partner_deduplicate_acl/tests/test_partner_deduplicate_acl.py
  9. 21
      partner_deduplicate_acl/views/base_partner_merge_view.xml
  10. 2
      partner_deduplicate_acl/wizards/__init__.py
  11. 2
      partner_deduplicate_acl/wizards/partner_merge.py
  12. 52
      partner_deduplicate_acl/wizards/partner_merge_view.xml

11
partner_deduplicate_acl/README.rst

@ -14,13 +14,13 @@ Deduplicate Contacts ACL
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github
:target: https://github.com/OCA/partner-contact/tree/12.0/partner_deduplicate_acl
:target: https://github.com/OCA/partner-contact/tree/13.0/partner_deduplicate_acl
:alt: OCA/partner-contact
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_deduplicate_acl
:target: https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-partner_deduplicate_acl
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/134/12.0
:target: https://runbot.odoo-community.org/runbot/134/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@ -74,7 +74,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/partner-contact/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/partner-contact/issues/new?body=module:%20partner_deduplicate_acl%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_deduplicate_acl%0Aversion:%2013.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.
@ -95,6 +95,7 @@ Contributors
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Luis M. Ontalba <luis.martinez@tecnativa.com>
* Victor M.M. Torres <victor.martin@tecnativa.com>
* Kevin Khao <kevin.khao@gmail.com>
Maintainers
~~~~~~~~~~~
@ -109,6 +110,6 @@ 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.
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/12.0/partner_deduplicate_acl>`_ project on GitHub.
This module is part of the `OCA/partner-contact <https://github.com/OCA/partner-contact/tree/13.0/partner_deduplicate_acl>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

2
partner_deduplicate_acl/__init__.py

@ -1,3 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import wizards

4
partner_deduplicate_acl/__manifest__.py

@ -2,12 +2,12 @@
# Copyright 2016 Tecnativa - Vicent Cubells
# Copyright 2017-2018 Tecnativa - Pedro M. Baeza
# Copyright 2019 Tecnativa - Victor M.M. Torres
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Deduplicate Contacts ACL",
"summary": "Contact deduplication with fine-grained permission control",
"version": "12.0.1.0.0",
"version": "13.0.1.0.0",
"category": "Tools",
"website": "https://github.com/OCA/partner-contact",
"author": "Tecnativa, " "Odoo Community Association (OCA)",

7
partner_deduplicate_acl/i18n/partner_deduplicate_acl.pot

@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * partner_deduplicate_acl
# * partner_deduplicate_acl
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@ -43,4 +43,3 @@ msgstr ""
#: model:res.groups,name:partner_deduplicate_acl.group_unrestricted
msgid "Without restrictions"
msgstr ""

1
partner_deduplicate_acl/readme/CONTRIBUTORS.rst

@ -4,3 +4,4 @@
* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Luis M. Ontalba <luis.martinez@tecnativa.com>
* Victor M.M. Torres <victor.martin@tecnativa.com>
* Kevin Khao <kevin.khao@gmail.com>

22
partner_deduplicate_acl/security/partner_deduplicate_acl_security.xml

@ -1,35 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!-- © 2016 Tecnativa S.L. - Jairo Llopis
© 2016 Tecnativa S.L. - Vicent Cubells
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -->
<odoo>
<!-- New user group category -->
<record id="category" model="ir.module.category">
<field name="name">Deduplicate Contacts</field>
</record>
<!-- New user groups -->
<record id="group_manually" model="res.groups">
<field name="name">Manually</field>
<field name="category_id" ref="category"/>
<field name="category_id" ref="category" />
</record>
<record id="group_automatically" model="res.groups">
<field name="name">Automatically</field>
<field name="category_id" ref="category"/>
<field name="implied_ids" eval="[(4, ref('group_manually'))]"/>
<field name="category_id" ref="category" />
<field name="implied_ids" eval="[(4, ref('group_manually'))]" />
</record>
<record id="group_unrestricted" model="res.groups">
<field name="name">Without restrictions</field>
<field name="category_id" ref="category"/>
<field name="implied_ids" eval="[(4, ref('group_automatically'))]"/>
<field name="category_id" ref="category" />
<field name="implied_ids" eval="[(4, ref('group_automatically'))]" />
</record>
<!-- Respect previous behavior -->
<record id="base.group_system" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_unrestricted'))]"/>
<field name="implied_ids" eval="[(4, ref('group_unrestricted'))]" />
</record>
</odoo>

7
partner_deduplicate_acl/static/description/index.html

@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/partner-contact/tree/12.0/partner_deduplicate_acl"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/partner-contact-12-0/partner-contact-12-0-partner_deduplicate_acl"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/134/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/partner-contact/tree/13.0/partner_deduplicate_acl"><img alt="OCA/partner-contact" src="https://img.shields.io/badge/github-OCA%2Fpartner--contact-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/partner-contact-13-0/partner-contact-13-0-partner_deduplicate_acl"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/134/13.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module extends the functionality of the CRM contact deduplicator to add
permission groups that allow the matching users to use those tools, not
needing to be the sale settings manager.</p>
@ -432,7 +432,7 @@ this permission for him.</p>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/partner-contact/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_deduplicate_acl%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/partner-contact/issues/new?body=module:%20partner_deduplicate_acl%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@ -452,6 +452,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Pedro M. Baeza &lt;<a class="reference external" href="mailto:pedro.baeza&#64;tecnativa.com">pedro.baeza&#64;tecnativa.com</a>&gt;</li>
<li>Luis M. Ontalba &lt;<a class="reference external" href="mailto:luis.martinez&#64;tecnativa.com">luis.martinez&#64;tecnativa.com</a>&gt;</li>
<li>Victor M.M. Torres &lt;<a class="reference external" href="mailto:victor.martin&#64;tecnativa.com">victor.martin&#64;tecnativa.com</a>&gt;</li>
<li>Kevin Khao &lt;<a class="reference external" href="mailto:kevin.khao&#64;gmail.com">kevin.khao&#64;gmail.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
@ -461,7 +462,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/12.0/partner_deduplicate_acl">OCA/partner-contact</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/partner-contact/tree/13.0/partner_deduplicate_acl">OCA/partner-contact</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

4
partner_deduplicate_acl/tests/test_partner_deduplicate_acl.py

@ -1,5 +1,5 @@
# Copyright 2017-2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import exceptions
from odoo.tests import common
@ -31,7 +31,7 @@ class TestPartnerDeduplicateAcl(common.TransactionCase):
)
self.wizard = (
self.env["base.partner.merge.automatic.wizard"]
.sudo(self.user)
.with_user(self.user)
.create({"group_by_name": True})
)

21
partner_deduplicate_acl/views/base_partner_merge_view.xml

@ -1,15 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 Tecnativa - Jairo Llopis
Copyright 2016 Tecnativa - Vicent Cubells
Copyright 2017 Tecnativa - Pedro M. Baeza
Copyright 2019 Tecnativa - Victor M.M. Torres
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -->
<odoo>
<menuitem id='base_tools' name='Tools'
parent='contacts.menu_contacts' sequence="24"/>
<menuitem id='partner_merge_automatic_menu'
action='base.action_partner_deduplicate'
groups='group_automatically'
parent='base_tools'
<menuitem
id='base_tools'
name='Tools'
parent='contacts.menu_contacts'
sequence="24"
/>
<menuitem
id='partner_merge_automatic_menu'
action='base.action_partner_deduplicate'
groups='group_automatically'
parent='base_tools'
/>
</odoo>

2
partner_deduplicate_acl/wizards/__init__.py

@ -1,3 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import partner_merge

2
partner_deduplicate_acl/wizards/partner_merge.py

@ -1,7 +1,7 @@
# Copyright 2016 Tecnativa - Jairo Llopis
# Copyright 2016 Tecnativa - Vicent Cubells
# Copyright 2017-2019 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models

52
partner_deduplicate_acl/wizards/partner_merge_view.xml

@ -1,27 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016 Tecnativa - Jairo Llopis
Copyright 2016 Tecnativa - Vicent Cubells
Copyright 2018 Tecnativa - Pedro M. Baeza
Copyright 2019 Tecnativa - Victor M.M. Torres
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -->
<odoo>
<record id="base_partner_merge_automatic_wizard_form" model="ir.ui.view">
<field name="name">Restrict automatic merge access</field>
<field name="model">base.partner.merge.automatic.wizard</field>
<field name="inherit_id" ref="base.base_partner_merge_automatic_wizard_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_start_automatic_process']" position="attributes">
<attribute name="groups">partner_deduplicate_acl.group_automatically</attribute>
</xpath>
<xpath expr="//button[@name='action_update_all_process']" position="attributes">
<attribute name="groups">partner_deduplicate_acl.group_automatically</attribute>
</xpath>
</field>
</record>
<record id="base.action_partner_merge" model="ir.actions.act_window">
<field name="groups_id" eval="[(4, ref('partner_deduplicate_acl.group_manually'))]"/>
</record>
<record id="base_partner_merge_automatic_wizard_form" model="ir.ui.view">
<field name="name">Restrict automatic merge access</field>
<field name="model">base.partner.merge.automatic.wizard</field>
<field name="inherit_id" ref="base.base_partner_merge_automatic_wizard_form" />
<field name="arch" type="xml">
<xpath
expr="//button[@name='action_start_automatic_process']"
position="attributes"
>
<attribute
name="groups"
>partner_deduplicate_acl.group_automatically</attribute>
</xpath>
<xpath
expr="//button[@name='action_update_all_process']"
position="attributes"
>
<attribute
name="groups"
>partner_deduplicate_acl.group_automatically</attribute>
</xpath>
</field>
</record>
<record id="base.action_partner_merge" model="ir.actions.act_window">
<field
name="groups_id"
eval="[(4, ref('partner_deduplicate_acl.group_manually'))]"
/>
</record>
</odoo>
Loading…
Cancel
Save