diff --git a/partner_contact_access_link/README.rst b/partner_contact_access_link/README.rst new file mode 100644 index 000000000..fe69a2231 --- /dev/null +++ b/partner_contact_access_link/README.rst @@ -0,0 +1,97 @@ +=========================== +Partner contact access link +=========================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :alt: Production/Stable +.. |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%2Fpartner--contact-lightgray.png?logo=github + :target: https://github.com/OCA/partner-contact/tree/12.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-12-0/partner-contact-12-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/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +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. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +To use this module, you need to: + +#. Go to *Contacts* (if you don't see the menu, you might need to install the + *Contacts* app, or go to any other module where you can browse partners). +#. Select any contact that is a company and contains sub-contacts. +#. 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/12.0/partner_contact_access_link/static/description/full-form.gif + + +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Tecnativa + +Contributors +~~~~~~~~~~~~ + +* Jairo Llopis (`Tecnativa `__) + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +.. |maintainer-Yajo| image:: https://github.com/Yajo.png?size=40px + :target: https://github.com/Yajo + :alt: Yajo + +Current `maintainer `__: + +|maintainer-Yajo| + +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/__init__.py b/partner_contact_access_link/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/partner_contact_access_link/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/partner_contact_access_link/__manifest__.py b/partner_contact_access_link/__manifest__.py new file mode 100644 index 000000000..e57b27b97 --- /dev/null +++ b/partner_contact_access_link/__manifest__.py @@ -0,0 +1,21 @@ +# Copyright 2020 Tecnativa - Jairo Llopis +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Partner contact access link", + "summary": "Allow to visit the full contact form from a company", + "version": "12.0.1.0.0", + "development_status": "Production/Stable", + "category": "Tools", + "website": "https://github.com/OCA/partner-contact", + "author": "Tecnativa, Odoo Community Association (OCA)", + "maintainers": ["Yajo"], + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "base", + ], + "data": [ + "views/res_partner_views.xml", + ], +} diff --git a/partner_contact_access_link/models/__init__.py b/partner_contact_access_link/models/__init__.py new file mode 100644 index 000000000..91fed54d4 --- /dev/null +++ b/partner_contact_access_link/models/__init__.py @@ -0,0 +1 @@ +from . import res_partner diff --git a/partner_contact_access_link/models/res_partner.py b/partner_contact_access_link/models/res_partner.py new file mode 100644 index 000000000..f2fb784b6 --- /dev/null +++ b/partner_contact_access_link/models/res_partner.py @@ -0,0 +1,19 @@ +# Copyright 2020 Tecnativa - Jairo Llopis +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models + + +class ResPartner(models.Model): + _inherit = "res.partner" + + def open_child_form(self): + """Open child contact form from the parent partner form view""" + return { + "type": "ir.actions.act_window", + "res_model": "res.partner", + "res_id": self.id, + "view_mode": "form", + "view_type": "form", + "target": "current", + } diff --git a/partner_contact_access_link/readme/CONTRIBUTORS.rst b/partner_contact_access_link/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..2ba0f872b --- /dev/null +++ b/partner_contact_access_link/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Jairo Llopis (`Tecnativa `__) diff --git a/partner_contact_access_link/readme/DESCRIPTION.rst b/partner_contact_access_link/readme/DESCRIPTION.rst new file mode 100644 index 000000000..d6f06d5be --- /dev/null +++ b/partner_contact_access_link/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +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. diff --git a/partner_contact_access_link/readme/USAGE.rst b/partner_contact_access_link/readme/USAGE.rst new file mode 100644 index 000000000..c36c94784 --- /dev/null +++ b/partner_contact_access_link/readme/USAGE.rst @@ -0,0 +1,10 @@ +To use this module, you need to: + +#. Go to *Contacts* (if you don't see the menu, you might need to install the + *Contacts* app, or go to any other module where you can browse partners). +#. Select any contact that is a company and contains sub-contacts. +#. 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:: ../static/description/full-form.gif + diff --git a/partner_contact_access_link/static/description/full-form.gif b/partner_contact_access_link/static/description/full-form.gif new file mode 100644 index 000000000..b31a460d2 Binary files /dev/null and b/partner_contact_access_link/static/description/full-form.gif differ diff --git a/partner_contact_access_link/static/description/icon.png b/partner_contact_access_link/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/partner_contact_access_link/static/description/icon.png differ diff --git a/partner_contact_access_link/static/description/index.html b/partner_contact_access_link/static/description/index.html new file mode 100644 index 000000000..58c34908e --- /dev/null +++ b/partner_contact_access_link/static/description/index.html @@ -0,0 +1,439 @@ + + + + + + +Partner contact access link + + + + + + diff --git a/partner_contact_access_link/views/res_partner_views.xml b/partner_contact_access_link/views/res_partner_views.xml new file mode 100644 index 000000000..8612ff04a --- /dev/null +++ b/partner_contact_access_link/views/res_partner_views.xml @@ -0,0 +1,21 @@ + + + + + + + Add button to see child contacts full form + res.partner + + + + + + + + + +