From dde3b85d8a6ed92a35c87e968a8efad3ffe61a47 Mon Sep 17 00:00:00 2001 From: newtratip Date: Mon, 26 Oct 2020 01:28:09 +0700 Subject: [PATCH] [MIG] partner_contact_access_link: Migration to 14.0 --- partner_contact_access_link/README.rst | 13 +++++----- partner_contact_access_link/__manifest__.py | 2 +- .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 9 ++++--- partner_contact_access_link/tests/__init__.py | 1 + .../tests/test_partner_contact_access_link.py | 25 +++++++++++++++++++ .../odoo/addons/partner_contact_access_link | 1 + setup/partner_contact_access_link/setup.py | 6 +++++ 8 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 partner_contact_access_link/tests/__init__.py create mode 100644 partner_contact_access_link/tests/test_partner_contact_access_link.py create mode 120000 setup/partner_contact_access_link/odoo/addons/partner_contact_access_link create mode 100644 setup/partner_contact_access_link/setup.py diff --git a/partner_contact_access_link/README.rst b/partner_contact_access_link/README.rst index 27a6bc764..88ff08c31 100644 --- a/partner_contact_access_link/README.rst +++ b/partner_contact_access_link/README.rst @@ -14,13 +14,13 @@ Partner contact access link :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/13.0/partner_contact_access_link + :target: https://github.com/OCA/partner-contact/tree/14.0/partner_contact_access_link :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-13-0/partner-contact-13-0-partner_contact_access_link + :target: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-partner_contact_access_link :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/13.0 + :target: https://runbot.odoo-community.org/runbot/134/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -45,7 +45,7 @@ To use this module, you need to: #. You will see a new little button next to each contact's name that you can click to go to hers/his full form: - .. image:: https://raw.githubusercontent.com/OCA/partner-contact/13.0/partner_contact_access_link/static/description/full-form.gif + .. image:: https://raw.githubusercontent.com/OCA/partner-contact/14.0/partner_contact_access_link/static/description/full-form.gif Bug Tracker =========== @@ -53,7 +53,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -70,6 +70,7 @@ Contributors * Jairo Llopis (`Tecnativa `__) * Harald Panten (`Sygel Technology `__) +* Tharathip Chaweewongphan Maintainers ~~~~~~~~~~~ @@ -92,6 +93,6 @@ Current `maintainer `__: |maintainer-Yajo| -This module is part of the `OCA/partner-contact `_ project on GitHub. +This module is part of the `OCA/partner-contact `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/partner_contact_access_link/__manifest__.py b/partner_contact_access_link/__manifest__.py index 78d869f9c..e31e9a3ed 100644 --- a/partner_contact_access_link/__manifest__.py +++ b/partner_contact_access_link/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Partner contact access link", "summary": "Allow to visit the full contact form from a company", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "development_status": "Production/Stable", "category": "Tools", "website": "https://github.com/OCA/partner-contact", diff --git a/partner_contact_access_link/readme/CONTRIBUTORS.rst b/partner_contact_access_link/readme/CONTRIBUTORS.rst index ddb9bca14..9ecf25f7e 100644 --- a/partner_contact_access_link/readme/CONTRIBUTORS.rst +++ b/partner_contact_access_link/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Jairo Llopis (`Tecnativa `__) * Harald Panten (`Sygel Technology `__) +* Tharathip Chaweewongphan diff --git a/partner_contact_access_link/static/description/index.html b/partner_contact_access_link/static/description/index.html index 71186c00c..01b75ea61 100644 --- a/partner_contact_access_link/static/description/index.html +++ b/partner_contact_access_link/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runbot

+

Production/Stable License: AGPL-3 OCA/partner-contact Translate me on Weblate Try me on Runbot

This module extends the functionality of the partners form and to allow you to click on a button and open the full contact form while watching a company form.

@@ -395,7 +395,7 @@ while watching a company form.

  • You will see a new little button next to each contact’s name that you can click to go to hers/his full form:

    -https://raw.githubusercontent.com/OCA/partner-contact/13.0/partner_contact_access_link/static/description/full-form.gif +https://raw.githubusercontent.com/OCA/partner-contact/14.0/partner_contact_access_link/static/description/full-form.gif
  • @@ -404,7 +404,7 @@ can click to go to hers/his full form:

    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.

    +feedback.

    Do not contact contributors directly about support or help with technical issues.

    @@ -420,6 +420,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
    @@ -431,7 +432,7 @@ mission is to support the collaborative development of Odoo features and promote its widespread use.

    Current maintainer:

    Yajo

    -

    This module is part of the OCA/partner-contact project on GitHub.

    +

    This module is part of the OCA/partner-contact project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/partner_contact_access_link/tests/__init__.py b/partner_contact_access_link/tests/__init__.py new file mode 100644 index 000000000..aeb3c771c --- /dev/null +++ b/partner_contact_access_link/tests/__init__.py @@ -0,0 +1 @@ +from . import test_partner_contact_access_link diff --git a/partner_contact_access_link/tests/test_partner_contact_access_link.py b/partner_contact_access_link/tests/test_partner_contact_access_link.py new file mode 100644 index 000000000..cedc5788f --- /dev/null +++ b/partner_contact_access_link/tests/test_partner_contact_access_link.py @@ -0,0 +1,25 @@ +# Copyright 2020 Ecosoft Co., Ltd (http://ecosoft.co.th/) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) + +from odoo.tests.common import TransactionCase + + +class TestPartnerContactAccessLink(TransactionCase): + def setUp(self): + super().setUp() + self.partner_model = self.env["res.partner"] + self.company = self.partner_model.create( + {"name": "Test Company", "company_type": "company"} + ) + self.contact = self.partner_model.create( + {"name": "Test Contact", "type": "contact", "parent_id": self.company.id} + ) + + def test_partner_contact_access_link(self): + res = self.contact.open_child_form() + self.assertEqual(res["type"], "ir.actions.act_window") + self.assertEqual(res["res_model"], "res.partner") + self.assertEqual(res["res_id"], self.contact.id) + self.assertEqual(res["view_mode"], "form") + self.assertEqual(res["view_type"], "form") + self.assertEqual(res["target"], "current") diff --git a/setup/partner_contact_access_link/odoo/addons/partner_contact_access_link b/setup/partner_contact_access_link/odoo/addons/partner_contact_access_link new file mode 120000 index 000000000..1cbfa4efc --- /dev/null +++ b/setup/partner_contact_access_link/odoo/addons/partner_contact_access_link @@ -0,0 +1 @@ +../../../../partner_contact_access_link \ No newline at end of file diff --git a/setup/partner_contact_access_link/setup.py b/setup/partner_contact_access_link/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/partner_contact_access_link/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)